From c6a93f132c0c46c632a651a38a2000eb98a28690 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 17 Dec 2025 19:04:31 +0000 Subject: [PATCH 1/2] feat: add LookerGoldenQuery to Context PiperOrigin-RevId: 845792138 Source-Link: https://github.com/googleapis/googleapis/commit/80509f2e7c23556d0068eb01471bc9ddd7b93bb5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/59b52c2db0cc671c41085ea36162fa29a8b4598f Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdlbWluaV9kYXRhX2FuYWx5dGljcy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjU5YjUyYzJkYjBjYzY3MWM0MTA4NWVhMzYxNjJmYTI5YThiNDU5OGYifQ== --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 +++ .../README.md | 154 ++ .../Rakefile | 169 +++ .../gapic_metadata.json | 102 ++ ...cloud-gemini_data_analytics-v1beta.gemspec | 30 + ...ogle-cloud-gemini_data_analytics-v1beta.rb | 21 + .../cloud/gemini_data_analytics/v1beta.rb | 46 + .../v1beta/bindings_override.rb | 75 + .../v1beta/data_agent_service.rb | 56 + .../v1beta/data_agent_service/client.rb | 1303 +++++++++++++++++ .../v1beta/data_agent_service/credentials.rb | 47 + .../v1beta/data_agent_service/operations.rb | 841 +++++++++++ .../v1beta/data_agent_service/paths.rb | 69 + .../v1beta/data_agent_service/rest.rb | 54 + .../v1beta/data_agent_service/rest/client.rb | 1212 +++++++++++++++ .../data_agent_service/rest/operations.rb | 925 ++++++++++++ .../data_agent_service/rest/service_stub.rb | 573 ++++++++ .../v1beta/data_chat_service.rb | 57 + .../v1beta/data_chat_service/client.rb | 1147 +++++++++++++++ .../v1beta/data_chat_service/credentials.rb | 47 + .../v1beta/data_chat_service/paths.rb | 102 ++ .../v1beta/data_chat_service/rest.rb | 55 + .../v1beta/data_chat_service/rest/client.rb | 1065 ++++++++++++++ .../data_chat_service/rest/service_stub.rb | 505 +++++++ .../gemini_data_analytics/v1beta/rest.rb | 39 + .../gemini_data_analytics/v1beta/version.rb | 28 + .../v1beta/agent_context_pb.rb | 44 + .../geminidataanalytics/v1beta/context_pb.rb | 64 + .../v1beta/conversation_pb.rb | 53 + .../v1beta/credentials_pb.rb | 47 + .../v1beta/data_agent_pb.rb | 49 + .../v1beta/data_agent_service_pb.rb | 67 + .../v1beta/data_agent_service_services_pb.rb | 60 + .../v1beta/data_analytics_agent_pb.rb | 46 + .../v1beta/data_chat_service_pb.rb | 95 ++ .../v1beta/data_chat_service_services_pb.rb | 61 + .../v1beta/datasource_pb.rb | 70 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++++++ .../proto_docs/google/api/field_behavior.rb | 85 ++ .../proto_docs/google/api/field_info.rb | 88 ++ .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 +++ .../v1beta/agent_context.rb | 35 + .../geminidataanalytics/v1beta/context.rb | 291 ++++ .../v1beta/conversation.rb | 155 ++ .../geminidataanalytics/v1beta/credentials.rb | 74 + .../geminidataanalytics/v1beta/data_agent.rb | 90 ++ .../v1beta/data_agent_service.rb | 267 ++++ .../v1beta/data_analytics_agent.rb | 46 + .../v1beta/data_chat_service.rb | 764 ++++++++++ .../geminidataanalytics/v1beta/datasource.rb | 465 ++++++ .../proto_docs/google/iam/v1/iam_policy.rb | 87 ++ .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++++++ .../google/longrunning/operations.rb | 191 +++ .../proto_docs/google/protobuf/any.rb | 145 ++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 +++ .../proto_docs/google/protobuf/struct.rb | 108 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 ++ .../proto_docs/google/protobuf/wrappers.rb | 121 ++ .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../data_agent_service/create_data_agent.rb | 54 + .../data_agent_service/delete_data_agent.rb | 54 + .../data_agent_service/get_data_agent.rb | 47 + .../data_agent_service/get_iam_policy.rb | 47 + .../list_accessible_data_agents.rb | 51 + .../data_agent_service/list_data_agents.rb | 51 + .../data_agent_service/set_iam_policy.rb | 47 + .../data_agent_service/update_data_agent.rb | 54 + .../snippets/data_chat_service/chat.rb | 50 + .../data_chat_service/create_conversation.rb | 47 + .../data_chat_service/delete_conversation.rb | 47 + .../data_chat_service/get_conversation.rb | 47 + .../data_chat_service/list_conversations.rb | 51 + .../data_chat_service/list_messages.rb | 51 + .../snippets/data_chat_service/query_data.rb | 47 + ...ogle.cloud.geminidataanalytics.v1beta.json | 615 ++++++++ .../data_agent_service_operations_test.rb | 400 +++++ .../v1beta/data_agent_service_paths_test.rb | 67 + .../v1beta/data_agent_service_rest_test.rb | 551 +++++++ .../v1beta/data_agent_service_test.rb | 647 ++++++++ .../v1beta/data_chat_service_paths_test.rb | 91 ++ .../v1beta/data_chat_service_rest_test.rb | 492 +++++++ .../v1beta/data_chat_service_test.rb | 566 +++++++ .../test/helper.rb | 25 + 98 files changed, 18931 insertions(+) create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.gitignore create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.yardopts create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Gemfile create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/README.md create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Rakefile create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/google-cloud-gemini_data_analytics-v1beta.gemspec create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google-cloud-gemini_data_analytics-v1beta.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/version.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/agent_context_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/credentials_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/agent_context.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/create_data_agent.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/delete_data_agent.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_data_agent.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_accessible_data_agents.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_data_agents.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/update_data_agent.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/chat.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/create_conversation.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/delete_conversation.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/get_conversation.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_conversations.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_messages.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/query_data.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_test.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_test.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/helper.rb diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.gitignore b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.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-gemini_data_analytics-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..6e2c2632e0fd --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "geminidataanalytics.googleapis.com", + "api_shortname": "geminidataanalytics", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest", + "distribution_name": "google-cloud-gemini_data_analytics-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "geminidataanalytics", + "name_pretty": "Data Analytics API with Gemini V1BETA API", + "product_documentation": "https://cloud.google.com/gemini/docs/conversational-analytics-api/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-gemini_data_analytics-v1beta is the official client library for the Data Analytics API with Gemini V1BETA API. Note that google-cloud-gemini_data_analytics-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gemini_data_analytics instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/gemini/docs/conversational-analytics-api/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.rubocop.yml new file mode 100644 index 000000000000..172df49db402 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-gemini_data_analytics-v1beta.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-gemini_data_analytics-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.toys.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.toys.rb new file mode 100644 index 000000000000..9a210f1427c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/.yardopts b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.yardopts new file mode 100644 index 000000000000..fcdc9029f088 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Data Analytics API with Gemini V1BETA 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-gemini_data_analytics-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..ebad6702f055 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta 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/gemini_data_analytics/v1beta" + +client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/gemini_data_analytics/v1beta" + +::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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-gemini_data_analytics-v1beta +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/gemini_data_analytics/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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-gemini_data_analytics-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Gemfile b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/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-gemini_data_analytics-v1beta/README.md b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/README.md new file mode 100644 index 000000000000..05eceb828b4c --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Data Analytics API with Gemini V1BETA API + +API Client library for the Data Analytics API with Gemini V1BETA API + +google-cloud-gemini_data_analytics-v1beta is the official client library for the Data Analytics API with Gemini V1BETA API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Data Analytics API with Gemini V1BETA API. Most users should consider using +the main client gem, +[google-cloud-gemini_data_analytics](https://rubygems.org/gems/google-cloud-gemini_data_analytics). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-gemini_data_analytics-v1beta +``` + +## 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/geminidataanalytics.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/gemini_data_analytics/v1beta" + +client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new +request = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new # (request fields as keyword arguments...) +response = client.list_data_agents request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/gemini/docs/conversational-analytics-api/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/gemini_data_analytics/v1beta" +require "logger" + +client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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-gemini_data_analytics`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-gemini_data_analytics-v1beta`. +_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-gemini_data_analytics`. +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-gemini_data_analytics-v1beta`. + +### 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-gemini_data_analytics-v1beta/Rakefile b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Rakefile new file mode 100644 index 000000000000..85c10bdea567 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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-gemini_data_analytics-v1beta 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/gemini_data_analytics/v1beta/data_agent_service/credentials" + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-gemini_data_analytics-v1beta" + header "google-cloud-gemini_data_analytics-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-gemini_data_analytics-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..34d045e95665 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/gapic_metadata.json @@ -0,0 +1,102 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.geminidataanalytics.v1beta", + "libraryPackage": "::Google::Cloud::GeminiDataAnalytics::V1beta", + "services": { + "DataAgentService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client", + "rpcs": { + "ListDataAgents": { + "methods": [ + "list_data_agents" + ] + }, + "ListAccessibleDataAgents": { + "methods": [ + "list_accessible_data_agents" + ] + }, + "GetDataAgent": { + "methods": [ + "get_data_agent" + ] + }, + "CreateDataAgent": { + "methods": [ + "create_data_agent" + ] + }, + "UpdateDataAgent": { + "methods": [ + "update_data_agent" + ] + }, + "DeleteDataAgent": { + "methods": [ + "delete_data_agent" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + } + } + } + } + }, + "DataChatService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client", + "rpcs": { + "Chat": { + "methods": [ + "chat" + ] + }, + "CreateConversation": { + "methods": [ + "create_conversation" + ] + }, + "DeleteConversation": { + "methods": [ + "delete_conversation" + ] + }, + "GetConversation": { + "methods": [ + "get_conversation" + ] + }, + "ListConversations": { + "methods": [ + "list_conversations" + ] + }, + "ListMessages": { + "methods": [ + "list_messages" + ] + }, + "QueryData": { + "methods": [ + "query_data" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/google-cloud-gemini_data_analytics-v1beta.gemspec b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/google-cloud-gemini_data_analytics-v1beta.gemspec new file mode 100644 index 000000000000..a163573e82ce --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/google-cloud-gemini_data_analytics-v1beta.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/gemini_data_analytics/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-gemini_data_analytics-v1beta" + gem.version = Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-gemini_data_analytics-v1beta is the official client library for the Data Analytics API with Gemini V1BETA API. Note that google-cloud-gemini_data_analytics-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gemini_data_analytics instead. See the readme for more details." + gem.summary = "API Client library for the Data Analytics API with Gemini V1BETA API" + 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.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google-cloud-gemini_data_analytics-v1beta.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google-cloud-gemini_data_analytics-v1beta.rb new file mode 100644 index 000000000000..5266e28165e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google-cloud-gemini_data_analytics-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/gemini_data_analytics/v1beta" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta.rb new file mode 100644 index 000000000000..c4b2f8a9f9ac --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gemini_data_analytics/v1beta/data_agent_service" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service" +require "google/cloud/gemini_data_analytics/v1beta/version" + +module Google + module Cloud + module GeminiDataAnalytics + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/gemini_data_analytics/v1beta" + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/gemini_data_analytics/v1beta" + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + module V1beta + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/gemini_data_analytics/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb new file mode 100644 index 000000000000..40aff60653e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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" + +module Google + module Cloud + module GeminiDataAnalytics + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/gemini_data_analytics/v1beta/rest" + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + module V1beta + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "GeminiDataAnalytics"] + 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 = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb new file mode 100644 index 000000000000..4c1c719e08ed --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gemini_data_analytics/v1beta/version" + +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/client" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest" + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + ## + # Service describing handlers for resources. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/gemini_data_analytics/v1beta/data_agent_service" + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest" + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + module DataAgentService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_agent_service", "helpers.rb" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb new file mode 100644 index 000000000000..1960ffdb8f05 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb @@ -0,0 +1,1303 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_agent_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + module DataAgentService + ## + # Client for the DataAgentService service. + # + # Service describing handlers for resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_agent_service_stub + + ## + # Configure the DataAgentService Client class. + # + # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataAgentService clients + # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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", "GeminiDataAnalytics", "V1beta"] + 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.timeout = 600.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataAgentService 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::GeminiDataAnalytics::V1beta::DataAgentService::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_agent_service_stub.universe_domain + end + + ## + # Create a new DataAgentService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataAgentService 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/geminidataanalytics/v1beta/data_agent_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @data_agent_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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_agent_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_agent_service_stub.endpoint + config.universe_domain = @data_agent_service_stub.universe_domain + config.logger = @data_agent_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_agent_service_stub.logger + end + + # Service calls + + ## + # Lists DataAgents in a given project and location. + # + # @overload list_data_agents(request, options = nil) + # Pass arguments to `list_data_agents` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil) + # Pass arguments to `list_data_agents` via keyword arguments. Note that at + # least one keyword argument is 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. Parent value for ListDataAgentsRequest. + # @param page_size [::Integer] + # Optional. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataAgents` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataAgents` must + # match the call that provided the page token. The service may return fewer + # than this value. + # @param filter [::String] + # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + # syntax. + # @param order_by [::String] + # Optional. User specification for how to order the results. + # @param show_deleted [::Boolean] + # Optional. If true, the list results will include soft-deleted DataAgents. + # Defaults to false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new + # + # # Call the list_data_agents method. + # result = client.list_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. + # p item + # end + # + def list_data_agents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest + + # Converts hash and nil to 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_agents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_agents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_agents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.call_rpc :list_data_agents, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_agent_service_stub, :list_data_agents, 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 + + ## + # Lists DataAgents that are accessible to the caller in a given project and + # location. + # + # @overload list_accessible_data_agents(request, options = nil) + # Pass arguments to `list_accessible_data_agents` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_accessible_data_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil, creator_filter: nil) + # Pass arguments to `list_accessible_data_agents` via keyword arguments. Note that at + # least one keyword argument is 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. Parent value for ListAccessibleDataAgentsRequest. + # @param page_size [::Integer] + # Optional. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccessibleDataAgents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListAccessibleDataAgents` must match the call that provided the page + # token. The service may return fewer than this value. + # @param filter [::String] + # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + # syntax. + # @param order_by [::String] + # Optional. User specification for how to order the results. + # @param show_deleted [::Boolean] + # Optional. If true, the list results will include soft-deleted DataAgents. + # Defaults to false. + # @param creator_filter [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest::CreatorFilter] + # Optional. Filter for the creator of the agent. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new + # + # # Call the list_accessible_data_agents method. + # result = client.list_accessible_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. + # p item + # end + # + def list_accessible_data_agents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest + + # Converts hash and nil to 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_accessible_data_agents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_accessible_data_agents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_accessible_data_agents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.call_rpc :list_accessible_data_agents, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_agent_service_stub, :list_accessible_data_agents, 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 details of a single DataAgent. + # + # @overload get_data_agent(request, options = nil) + # Pass arguments to `get_data_agent` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(name: nil) + # Pass arguments to `get_data_agent` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.new + # + # # Call the get_data_agent method. + # result = client.get_data_agent request + # + # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent. + # p result + # + def get_data_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest + + # Converts hash and nil to 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_agent.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_agent.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.call_rpc :get_data_agent, 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 new DataAgent in a given project and location. + # + # @overload create_data_agent(request, options = nil) + # Pass arguments to `create_data_agent` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(parent: nil, data_agent_id: nil, data_agent: nil, request_id: nil) + # Pass arguments to `create_data_agent` via keyword arguments. Note that at + # least one keyword argument is 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. Value for parent. + # @param data_agent_id [::String] + # Optional. Id of the requesting object. Must be unique within the parent. + # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # If not provided, the server will auto-generate a value for the id. + # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new + # + # # Call the create_data_agent method. + # result = client.create_data_agent 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_data_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest + + # Converts hash and nil to 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_agent.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_agent.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.call_rpc :create_data_agent, 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 + + ## + # Updates the parameters of a single DataAgent. + # + # @overload update_data_agent(request, options = nil) + # Pass arguments to `update_data_agent` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(update_mask: nil, data_agent: nil, request_id: nil) + # Pass arguments to `update_data_agent` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # DataAgent resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields with non-default values + # present in the request will be overwritten. If a wildcard mask is provided, + # all fields will be overwritten. + # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new + # + # # Call the update_data_agent method. + # result = client.update_data_agent 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 update_data_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest + + # Converts hash and nil to 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_agent.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_agent&.name + header_params["data_agent.name"] = request.data_agent.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_agent.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.call_rpc :update_data_agent, 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 single DataAgent. + # + # @overload delete_data_agent(request, options = nil) + # Pass arguments to `delete_data_agent` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(name: nil, request_id: nil) + # Pass arguments to `delete_data_agent` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @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/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new + # + # # Call the delete_data_agent method. + # result = client.delete_data_agent request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest + + # Converts hash and nil to 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_agent.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_agent.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.call_rpc :delete_data_agent, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy for DataAgent + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to 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_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_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_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.call_rpc :get_iam_policy, 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 + + ## + # Sets the IAM policy for a DataAgent. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.call_rpc :set_iam_policy, 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 DataAgentService API. + # + # This class represents the configuration for DataAgentService, + # 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::GeminiDataAnalytics::V1beta::DataAgentService::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_data_agents to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_agents.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_agents.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::GeminiDataAnalytics::V1beta::DataAgentService::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 = "geminidataanalytics.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 DataAgentService 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_data_agents` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_agents + ## + # RPC-specific configuration for `list_accessible_data_agents` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accessible_data_agents + ## + # RPC-specific configuration for `get_data_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_agent + ## + # RPC-specific configuration for `create_data_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_agent + ## + # RPC-specific configuration for `update_data_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_agent + ## + # RPC-specific configuration for `delete_data_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_agent + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + + # @private + def initialize parent_rpcs = nil + list_data_agents_config = parent_rpcs.list_data_agents if parent_rpcs.respond_to? :list_data_agents + @list_data_agents = ::Gapic::Config::Method.new list_data_agents_config + list_accessible_data_agents_config = parent_rpcs.list_accessible_data_agents if parent_rpcs.respond_to? :list_accessible_data_agents + @list_accessible_data_agents = ::Gapic::Config::Method.new list_accessible_data_agents_config + get_data_agent_config = parent_rpcs.get_data_agent if parent_rpcs.respond_to? :get_data_agent + @get_data_agent = ::Gapic::Config::Method.new get_data_agent_config + create_data_agent_config = parent_rpcs.create_data_agent if parent_rpcs.respond_to? :create_data_agent + @create_data_agent = ::Gapic::Config::Method.new create_data_agent_config + update_data_agent_config = parent_rpcs.update_data_agent if parent_rpcs.respond_to? :update_data_agent + @update_data_agent = ::Gapic::Config::Method.new update_data_agent_config + delete_data_agent_config = parent_rpcs.delete_data_agent if parent_rpcs.respond_to? :delete_data_agent + @delete_data_agent = ::Gapic::Config::Method.new delete_data_agent_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb new file mode 100644 index 000000000000..f3ca31d72405 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 GeminiDataAnalytics + module V1beta + module DataAgentService + # Credentials for the DataAgentService 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-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb new file mode 100644 index 000000000000..a34e1c89aa92 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 GeminiDataAnalytics + module V1beta + module DataAgentService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataAgentService 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 DataAgentService 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::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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::GeminiDataAnalytics::V1beta::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 = "geminidataanalytics.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-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb new file mode 100644 index 000000000000..ad362af7a503 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + module DataAgentService + # Path helper methods for the DataAgentService API. + module Paths + ## + # Create a fully-qualified DataAgent resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataAgents/{data_agent}` + # + # @param project [String] + # @param location [String] + # @param data_agent [String] + # + # @return [::String] + def data_agent_path project:, location:, data_agent: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataAgents/#{data_agent}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb new file mode 100644 index 000000000000..9af7547b860e --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gemini_data_analytics/v1beta/version" +require "google/cloud/gemini_data_analytics/v1beta/bindings_override" + +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client" + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + ## + # Service describing handlers for resources. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest" + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + module DataAgentService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb new file mode 100644 index 000000000000..d7bef73846e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb @@ -0,0 +1,1212 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_agent_service_pb" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + module DataAgentService + module Rest + ## + # REST client for the DataAgentService service. + # + # Service describing handlers for resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_agent_service_stub + + ## + # Configure the DataAgentService Client class. + # + # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataAgentService clients + # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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", "GeminiDataAnalytics", "V1beta"] + 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.timeout = 600.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataAgentService 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::GeminiDataAnalytics::V1beta::DataAgentService::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_agent_service_stub.universe_domain + end + + ## + # Create a new DataAgentService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataAgentService 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::GeminiDataAnalytics::V1beta::DataAgentService::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 + + @data_agent_service_stub = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_agent_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_agent_service_stub.endpoint + config.universe_domain = @data_agent_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @data_agent_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_agent_service_stub.logger + end + + # Service calls + + ## + # Lists DataAgents in a given project and location. + # + # @overload list_data_agents(request, options = nil) + # Pass arguments to `list_data_agents` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil) + # Pass arguments to `list_data_agents` via keyword arguments. Note that at + # least one keyword argument is 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. Parent value for ListDataAgentsRequest. + # @param page_size [::Integer] + # Optional. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataAgents` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataAgents` must + # match the call that provided the page token. The service may return fewer + # than this value. + # @param filter [::String] + # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + # syntax. + # @param order_by [::String] + # Optional. User specification for how to order the results. + # @param show_deleted [::Boolean] + # Optional. If true, the list results will include soft-deleted DataAgents. + # Defaults to false. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new + # + # # Call the list_data_agents method. + # result = client.list_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. + # p item + # end + # + def list_data_agents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest + + # Converts hash and nil to an 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_agents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_agents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_agents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.list_data_agents request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_agent_service_stub, :list_data_agents, "data_agents", 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 + + ## + # Lists DataAgents that are accessible to the caller in a given project and + # location. + # + # @overload list_accessible_data_agents(request, options = nil) + # Pass arguments to `list_accessible_data_agents` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_accessible_data_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil, creator_filter: nil) + # Pass arguments to `list_accessible_data_agents` via keyword arguments. Note that at + # least one keyword argument is 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. Parent value for ListAccessibleDataAgentsRequest. + # @param page_size [::Integer] + # Optional. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListAccessibleDataAgents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListAccessibleDataAgents` must match the call that provided the page + # token. The service may return fewer than this value. + # @param filter [::String] + # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + # syntax. + # @param order_by [::String] + # Optional. User specification for how to order the results. + # @param show_deleted [::Boolean] + # Optional. If true, the list results will include soft-deleted DataAgents. + # Defaults to false. + # @param creator_filter [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest::CreatorFilter] + # Optional. Filter for the creator of the agent. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new + # + # # Call the list_accessible_data_agents method. + # result = client.list_accessible_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. + # p item + # end + # + def list_accessible_data_agents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest + + # Converts hash and nil to an 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_accessible_data_agents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_accessible_data_agents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_accessible_data_agents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.list_accessible_data_agents request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_agent_service_stub, :list_accessible_data_agents, "data_agents", 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 details of a single DataAgent. + # + # @overload get_data_agent(request, options = nil) + # Pass arguments to `get_data_agent` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(name: nil) + # Pass arguments to `get_data_agent` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.new + # + # # Call the get_data_agent method. + # result = client.get_data_agent request + # + # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent. + # p result + # + def get_data_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest + + # Converts hash and nil to an 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_agent.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_agent.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.get_data_agent 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 new DataAgent in a given project and location. + # + # @overload create_data_agent(request, options = nil) + # Pass arguments to `create_data_agent` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(parent: nil, data_agent_id: nil, data_agent: nil, request_id: nil) + # Pass arguments to `create_data_agent` via keyword arguments. Note that at + # least one keyword argument is 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. Value for parent. + # @param data_agent_id [::String] + # Optional. Id of the requesting object. Must be unique within the parent. + # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # If not provided, the server will auto-generate a value for the id. + # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent, ::Hash] + # Required. The resource being created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new + # + # # Call the create_data_agent method. + # result = client.create_data_agent 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_data_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest + + # Converts hash and nil to an 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_agent.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_agent.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.create_data_agent 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 + + ## + # Updates the parameters of a single DataAgent. + # + # @overload update_data_agent(request, options = nil) + # Pass arguments to `update_data_agent` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(update_mask: nil, data_agent: nil, request_id: nil) + # Pass arguments to `update_data_agent` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # DataAgent resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields with non-default values + # present in the request will be overwritten. If a wildcard mask is provided, + # all fields will be overwritten. + # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent, ::Hash] + # Required. The resource being updated. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new + # + # # Call the update_data_agent method. + # result = client.update_data_agent 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 update_data_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest + + # Converts hash and nil to an 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_agent.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_agent.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.update_data_agent 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 single DataAgent. + # + # @overload delete_data_agent(request, options = nil) + # Pass arguments to `delete_data_agent` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_agent(name: nil, request_id: nil) + # Pass arguments to `delete_data_agent` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new + # + # # Call the delete_data_agent method. + # result = client.delete_data_agent request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_data_agent request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest + + # Converts hash and nil to an 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_agent.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_agent.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_agent.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.delete_data_agent request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the IAM policy for DataAgent + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an 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_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.get_iam_policy 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 + + ## + # Sets the IAM policy for a DataAgent. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_agent_service_stub.set_iam_policy 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 DataAgentService REST API. + # + # This class represents the configuration for DataAgentService 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::GeminiDataAnalytics::V1beta::DataAgentService::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_data_agents to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_agents.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_agents.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 = "geminidataanalytics.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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, 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 DataAgentService 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_data_agents` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_agents + ## + # RPC-specific configuration for `list_accessible_data_agents` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accessible_data_agents + ## + # RPC-specific configuration for `get_data_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_agent + ## + # RPC-specific configuration for `create_data_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_agent + ## + # RPC-specific configuration for `update_data_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_agent + ## + # RPC-specific configuration for `delete_data_agent` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_agent + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + + # @private + def initialize parent_rpcs = nil + list_data_agents_config = parent_rpcs.list_data_agents if parent_rpcs.respond_to? :list_data_agents + @list_data_agents = ::Gapic::Config::Method.new list_data_agents_config + list_accessible_data_agents_config = parent_rpcs.list_accessible_data_agents if parent_rpcs.respond_to? :list_accessible_data_agents + @list_accessible_data_agents = ::Gapic::Config::Method.new list_accessible_data_agents_config + get_data_agent_config = parent_rpcs.get_data_agent if parent_rpcs.respond_to? :get_data_agent + @get_data_agent = ::Gapic::Config::Method.new get_data_agent_config + create_data_agent_config = parent_rpcs.create_data_agent if parent_rpcs.respond_to? :create_data_agent + @create_data_agent = ::Gapic::Config::Method.new create_data_agent_config + update_data_agent_config = parent_rpcs.update_data_agent if parent_rpcs.respond_to? :update_data_agent + @update_data_agent = ::Gapic::Config::Method.new update_data_agent_config + delete_data_agent_config = parent_rpcs.delete_data_agent if parent_rpcs.respond_to? :delete_data_agent + @delete_data_agent = ::Gapic::Config::Method.new delete_data_agent_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb new file mode 100644 index 000000000000..b2f6b2a5e2ad --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 GeminiDataAnalytics + module V1beta + module DataAgentService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the DataAgentService 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 DataAgentService 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::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "geminidataanalytics.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: "/v1beta/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb new file mode 100644 index 000000000000..0afe6184b86d --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb @@ -0,0 +1,573 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_agent_service_pb" + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + module DataAgentService + module Rest + ## + # REST service stub for the DataAgentService 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 list_data_agents REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GeminiDataAnalytics::V1beta::ListDataAgentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse] + # A result object deserialized from the server's reply + def list_data_agents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_agents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_agents", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse.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_accessible_data_agents REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse] + # A result object deserialized from the server's reply + def list_accessible_data_agents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_accessible_data_agents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_accessible_data_agents", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse.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_agent REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GeminiDataAnalytics::V1beta::DataAgent] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] + # A result object deserialized from the server's reply + def get_data_agent request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_agent_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_agent", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent.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_agent REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_data_agent request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_agent_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_agent", + 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 update_data_agent REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 update_data_agent request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_agent_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_agent", + 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_data_agent REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_data_agent request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_agent_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_agent", + 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_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.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_data_agents REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest] + # 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_agents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/dataAgents", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_accessible_data_agents REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest] + # 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_accessible_data_agents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/dataAgents:listAccessible", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_agent REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest] + # 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_agent_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataAgents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_agent REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest] + # 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_agent_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/dataAgents", + body: "data_agent", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_agent REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest] + # 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_agent_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{data_agent.name}", + body: "data_agent", + matches: [ + ["data_agent.name", %r{^projects/[^/]+/locations/[^/]+/dataAgents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_agent REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest] + # 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_agent_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataAgents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # 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_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAgents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAgents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb new file mode 100644 index 000000000000..974e0861a933 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gemini_data_analytics/v1beta/version" + +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/client" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest" + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + ## + # Service to ask a natural language question on top of BigQuery + # and Looker Studio datasources to get back streamed responses of various kinds + # to help provide a rich conversational answer. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/gemini_data_analytics/v1beta/data_chat_service" + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest" + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new + # + module DataChatService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_chat_service", "helpers.rb" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb new file mode 100644 index 000000000000..849fd4bf566f --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb @@ -0,0 +1,1147 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_chat_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + module DataChatService + ## + # Client for the DataChatService service. + # + # Service to ask a natural language question on top of BigQuery + # and Looker Studio datasources to get back streamed responses of various kinds + # to help provide a rich conversational answer. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_chat_service_stub + + ## + # Configure the DataChatService Client class. + # + # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataChatService clients + # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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", "GeminiDataAnalytics", "V1beta"] + 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.timeout = 600.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataChatService 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::GeminiDataAnalytics::V1beta::DataChatService::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_chat_service_stub.universe_domain + end + + ## + # Create a new DataChatService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataChatService 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/geminidataanalytics/v1beta/data_chat_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @data_chat_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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_chat_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 + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_chat_service_stub.endpoint + config.universe_domain = @data_chat_service_stub.universe_domain + config.logger = @data_chat_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_chat_service_stub.logger + end + + # Service calls + + ## + # Answers a data question by generating a stream of + # [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects. + # + # @overload chat(request, options = nil) + # Pass arguments to `chat` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload chat(inline_context: nil, conversation_reference: nil, data_agent_context: nil, client_managed_resource_context: nil, project: nil, parent: nil, messages: nil) + # Pass arguments to `chat` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param inline_context [::Google::Cloud::GeminiDataAnalytics::V1beta::Context, ::Hash] + # Optional. Inline context for the chat request. Use this to chat + # statelessly (without managed conversation persistence and without an + # Agent) by passing all context inline. + # + # Note: The following parameters are mutually exclusive: `inline_context`, `conversation_reference`, `data_agent_context`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param conversation_reference [::Google::Cloud::GeminiDataAnalytics::V1beta::ConversationReference, ::Hash] + # Optional. Reference to a persisted conversation and agent context. + # Use this to chat with an Agent using managed conversation persistence. + # + # Note: The following parameters are mutually exclusive: `conversation_reference`, `inline_context`, `data_agent_context`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param data_agent_context [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext, ::Hash] + # Optional. Context for the chat request. Use this to chat with an Agent + # statelessly, without managed conversation persistence. + # + # Note: The following parameters are mutually exclusive: `data_agent_context`, `inline_context`, `conversation_reference`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param client_managed_resource_context [::Google::Cloud::GeminiDataAnalytics::V1beta::ClientManagedResourceContext, ::Hash] + # Optional. Context with client managed resources. + # Some clients may not use GDA managed resources including + # conversations and agents, instead they create and manage their own + # conversations and agents resources. + # + # Note: The following parameters are mutually exclusive: `client_managed_resource_context`, `inline_context`, `conversation_reference`, `data_agent_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param project [::String] + # Optional. The Google Cloud project to be used for quota and billing. + # @param parent [::String] + # Required. The parent value for chat request. + # Pattern: `projects/{project}/locations/{location}` + # @param messages [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Message, ::Hash>] + # Required. Content of current conversation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Message>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Message>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new + # + # # Call the chat method to start streaming. + # output = client.chat request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::GeminiDataAnalytics::V1beta::Message + # output.each do |current_response| + # p current_response + # end + # + def chat request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.chat.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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.chat.timeout, + metadata: metadata, + retry_policy: @config.rpcs.chat.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.call_rpc :chat, 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 new conversation to persist the conversation history. Each + # conversation will have multiple messages associated with it. + # + # @overload create_conversation(request, options = nil) + # Pass arguments to `create_conversation` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_conversation(parent: nil, conversation_id: nil, conversation: nil, request_id: nil) + # Pass arguments to `create_conversation` via keyword arguments. Note that at + # least one keyword argument is 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. Parent value for CreateConversationRequest. + # Format: `projects/{project}/locations/{location}` + # @param conversation_id [::String] + # Optional. The conversation id of the conversation to create. + # Must be unique within the parent. + # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # If not provided, the server will auto-generate a value for the id. + # @param conversation [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation, ::Hash] + # Required. The conversation to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new + # + # # Call the create_conversation method. + # result = client.create_conversation request + # + # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. + # p result + # + def create_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest + + # Converts hash and nil to 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_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_conversation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.call_rpc :create_conversation, 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 conversation. + # + # @overload delete_conversation(request, options = nil) + # Pass arguments to `delete_conversation` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_conversation(name: nil) + # Pass arguments to `delete_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # Format: + # `projects/{project}/locations/{location}/conversations/{conversation}` + # + # @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/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new + # + # # Call the delete_conversation method. + # result = client.delete_conversation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest + + # Converts hash and nil to 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_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_conversation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.call_rpc :delete_conversation, 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 details of a single conversation by using conversation id and parent. + # + # @overload get_conversation(request, options = nil) + # Pass arguments to `get_conversation` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_conversation(name: nil) + # Pass arguments to `get_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # Format: + # `projects/{project}/locations/{location}/conversations/{conversation}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new + # + # # Call the get_conversation method. + # result = client.get_conversation request + # + # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. + # p result + # + def get_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest + + # Converts hash and nil to 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_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_conversation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.call_rpc :get_conversation, 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 conversations for a given parent. + # + # @overload list_conversations(request, options = nil) + # Pass arguments to `list_conversations` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_conversations` via keyword arguments. Note that at + # least one keyword argument is 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. Parent value for ListConversationsRequest. + # Format: `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. The max page size is 100. All larger page sizes will be coerced + # to 100. If unspecified, server will pick 50 as an approperiate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Returned conversations will match criteria specified within the + # filter. ListConversations allows filtering by: + # * agents + # * labels + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.new + # + # # Call the list_conversations method. + # result = client.list_conversations 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::GeminiDataAnalytics::V1beta::Conversation. + # p item + # end + # + def list_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest + + # Converts hash and nil to 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_conversations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_conversations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.call_rpc :list_conversations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_chat_service_stub, :list_conversations, 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 + + ## + # Lists all messages for a given conversation. + # + # @overload list_messages(request, options = nil) + # Pass arguments to `list_messages` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_messages(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_messages` via keyword arguments. Note that at + # least one keyword argument is 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 conversation to list messages under. + # Format: + # `projects/{project}/locations/{location}/conversations/{conversation_id}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. The max page size is 100. All larger page sizes will be coerced + # to 100. If unspecified, server will pick 50 as an approperiate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + # syntax. + # + # ListMessages allows filtering by: + # * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + # * update_time + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.new + # + # # Call the list_messages method. + # result = client.list_messages 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::GeminiDataAnalytics::V1beta::StorageMessage. + # p item + # end + # + def list_messages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest + + # Converts hash and nil to 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_messages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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_messages.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_messages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.call_rpc :list_messages, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_chat_service_stub, :list_messages, 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 + + ## + # Queries data from a natural language user query. + # + # @overload query_data(request, options = nil) + # Pass arguments to `query_data` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload query_data(parent: nil, prompt: nil, context: nil, generation_options: nil) + # Pass arguments to `query_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource to generate the query for. + # Format: projects/\\{project}/locations/\\{location} + # @param prompt [::String] + # Required. The natural language query for which to generate query. + # Example: "What are the top 5 best selling products this month?" + # @param context [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataContext, ::Hash] + # Required. The context for the data query, including the data sources to + # use. + # @param generation_options [::Google::Cloud::GeminiDataAnalytics::V1beta::GenerationOptions, ::Hash] + # Optional. Options to control query generation and execution behavior. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new + # + # # Call the query_data method. + # result = client.query_data request + # + # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse. + # p result + # + def query_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.query_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION + metadata[:"x-goog-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.query_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.call_rpc :query_data, 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 DataChatService API. + # + # This class represents the configuration for DataChatService, + # 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::GeminiDataAnalytics::V1beta::DataChatService::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 + # # chat to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.chat.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.chat.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::GeminiDataAnalytics::V1beta::DataChatService::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 = "geminidataanalytics.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 DataChatService 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 `chat` + # @return [::Gapic::Config::Method] + # + attr_reader :chat + ## + # RPC-specific configuration for `create_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversation + ## + # RPC-specific configuration for `delete_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversation + ## + # RPC-specific configuration for `get_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversation + ## + # RPC-specific configuration for `list_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversations + ## + # RPC-specific configuration for `list_messages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_messages + ## + # RPC-specific configuration for `query_data` + # @return [::Gapic::Config::Method] + # + attr_reader :query_data + + # @private + def initialize parent_rpcs = nil + chat_config = parent_rpcs.chat if parent_rpcs.respond_to? :chat + @chat = ::Gapic::Config::Method.new chat_config + create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation + @create_conversation = ::Gapic::Config::Method.new create_conversation_config + delete_conversation_config = parent_rpcs.delete_conversation if parent_rpcs.respond_to? :delete_conversation + @delete_conversation = ::Gapic::Config::Method.new delete_conversation_config + get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation + @get_conversation = ::Gapic::Config::Method.new get_conversation_config + list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations + @list_conversations = ::Gapic::Config::Method.new list_conversations_config + list_messages_config = parent_rpcs.list_messages if parent_rpcs.respond_to? :list_messages + @list_messages = ::Gapic::Config::Method.new list_messages_config + query_data_config = parent_rpcs.query_data if parent_rpcs.respond_to? :query_data + @query_data = ::Gapic::Config::Method.new query_data_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb new file mode 100644 index 000000000000..1b84d5caaf59 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 GeminiDataAnalytics + module V1beta + module DataChatService + # Credentials for the DataChatService 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-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb new file mode 100644 index 000000000000..adbd4636c7a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + module DataChatService + # Path helper methods for the DataChatService API. + module Paths + ## + # Create a fully-qualified Conversation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/conversations/{conversation}` + # + # @param project [String] + # @param location [String] + # @param conversation [String] + # + # @return [::String] + def conversation_path project:, location:, conversation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/conversations/#{conversation}" + end + + ## + # Create a fully-qualified DataAgent resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataAgents/{data_agent}` + # + # @param project [String] + # @param location [String] + # @param data_agent [String] + # + # @return [::String] + def data_agent_path project:, location:, data_agent: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataAgents/#{data_agent}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb new file mode 100644 index 000000000000..6d4c88e33b83 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gemini_data_analytics/v1beta/version" +require "google/cloud/gemini_data_analytics/v1beta/bindings_override" + +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client" + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + ## + # Service to ask a natural language question on top of BigQuery + # and Looker Studio datasources to get back streamed responses of various kinds + # to help provide a rich conversational answer. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest" + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new + # + module DataChatService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb new file mode 100644 index 000000000000..b4f9ee4a5dab --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb @@ -0,0 +1,1065 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_chat_service_pb" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + module DataChatService + module Rest + ## + # REST client for the DataChatService service. + # + # Service to ask a natural language question on top of BigQuery + # and Looker Studio datasources to get back streamed responses of various kinds + # to help provide a rich conversational answer. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_chat_service_stub + + ## + # Configure the DataChatService Client class. + # + # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataChatService clients + # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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", "GeminiDataAnalytics", "V1beta"] + 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.timeout = 600.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataChatService 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::GeminiDataAnalytics::V1beta::DataChatService::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_chat_service_stub.universe_domain + end + + ## + # Create a new DataChatService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataChatService 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_chat_service_stub = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_chat_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 + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_chat_service_stub.endpoint + config.universe_domain = @data_chat_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @data_chat_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_chat_service_stub.logger + end + + # Service calls + + ## + # Answers a data question by generating a stream of + # [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects. + # + # @overload chat(request, options = nil) + # Pass arguments to `chat` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload chat(inline_context: nil, conversation_reference: nil, data_agent_context: nil, client_managed_resource_context: nil, project: nil, parent: nil, messages: nil) + # Pass arguments to `chat` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param inline_context [::Google::Cloud::GeminiDataAnalytics::V1beta::Context, ::Hash] + # Optional. Inline context for the chat request. Use this to chat + # statelessly (without managed conversation persistence and without an + # Agent) by passing all context inline. + # + # Note: The following parameters are mutually exclusive: `inline_context`, `conversation_reference`, `data_agent_context`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param conversation_reference [::Google::Cloud::GeminiDataAnalytics::V1beta::ConversationReference, ::Hash] + # Optional. Reference to a persisted conversation and agent context. + # Use this to chat with an Agent using managed conversation persistence. + # + # Note: The following parameters are mutually exclusive: `conversation_reference`, `inline_context`, `data_agent_context`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param data_agent_context [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext, ::Hash] + # Optional. Context for the chat request. Use this to chat with an Agent + # statelessly, without managed conversation persistence. + # + # Note: The following parameters are mutually exclusive: `data_agent_context`, `inline_context`, `conversation_reference`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param client_managed_resource_context [::Google::Cloud::GeminiDataAnalytics::V1beta::ClientManagedResourceContext, ::Hash] + # Optional. Context with client managed resources. + # Some clients may not use GDA managed resources including + # conversations and agents, instead they create and manage their own + # conversations and agents resources. + # + # Note: The following parameters are mutually exclusive: `client_managed_resource_context`, `inline_context`, `conversation_reference`, `data_agent_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param project [::String] + # Optional. The Google Cloud project to be used for quota and billing. + # @param parent [::String] + # Required. The parent value for chat request. + # Pattern: `projects/{project}/locations/{location}` + # @param messages [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Message, ::Hash>] + # Required. Content of current conversation. + # @return [::Enumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Message>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new + # + # # Call the chat method to start streaming. + # output = client.chat request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::GeminiDataAnalytics::V1beta::Message + # output.each do |current_response| + # p current_response + # end + # + def chat request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.chat.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.chat.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.chat.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + ::Gapic::Rest::ServerStream.new( + ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, + ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| + @data_chat_service_stub.chat request, options do |chunk| + in_q.deq + out_q.enq chunk + end + end + ) + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new conversation to persist the conversation history. Each + # conversation will have multiple messages associated with it. + # + # @overload create_conversation(request, options = nil) + # Pass arguments to `create_conversation` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_conversation(parent: nil, conversation_id: nil, conversation: nil, request_id: nil) + # Pass arguments to `create_conversation` via keyword arguments. Note that at + # least one keyword argument is 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. Parent value for CreateConversationRequest. + # Format: `projects/{project}/locations/{location}` + # @param conversation_id [::String] + # Optional. The conversation id of the conversation to create. + # Must be unique within the parent. + # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # If not provided, the server will auto-generate a value for the id. + # @param conversation [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation, ::Hash] + # Required. The conversation to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new + # + # # Call the create_conversation method. + # result = client.create_conversation request + # + # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. + # p result + # + def create_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest + + # Converts hash and nil to an 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_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.create_conversation 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 conversation. + # + # @overload delete_conversation(request, options = nil) + # Pass arguments to `delete_conversation` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_conversation(name: nil) + # Pass arguments to `delete_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # Format: + # `projects/{project}/locations/{location}/conversations/{conversation}` + # @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/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new + # + # # Call the delete_conversation method. + # result = client.delete_conversation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest + + # Converts hash and nil to an 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_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.delete_conversation 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 details of a single conversation by using conversation id and parent. + # + # @overload get_conversation(request, options = nil) + # Pass arguments to `get_conversation` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_conversation(name: nil) + # Pass arguments to `get_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # Format: + # `projects/{project}/locations/{location}/conversations/{conversation}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new + # + # # Call the get_conversation method. + # result = client.get_conversation request + # + # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. + # p result + # + def get_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest + + # Converts hash and nil to an 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_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.get_conversation 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 conversations for a given parent. + # + # @overload list_conversations(request, options = nil) + # Pass arguments to `list_conversations` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_conversations` via keyword arguments. Note that at + # least one keyword argument is 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. Parent value for ListConversationsRequest. + # Format: `projects/{project}/locations/{location}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. The max page size is 100. All larger page sizes will be coerced + # to 100. If unspecified, server will pick 50 as an approperiate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Returned conversations will match criteria specified within the + # filter. ListConversations allows filtering by: + # * agents + # * labels + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.new + # + # # Call the list_conversations method. + # result = client.list_conversations 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::GeminiDataAnalytics::V1beta::Conversation. + # p item + # end + # + def list_conversations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest + + # Converts hash and nil to an 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_conversations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_conversations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_conversations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.list_conversations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_chat_service_stub, :list_conversations, "conversations", 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 + + ## + # Lists all messages for a given conversation. + # + # @overload list_messages(request, options = nil) + # Pass arguments to `list_messages` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_messages(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_messages` via keyword arguments. Note that at + # least one keyword argument is 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 conversation to list messages under. + # Format: + # `projects/{project}/locations/{location}/conversations/{conversation_id}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. The max page size is 100. All larger page sizes will be coerced + # to 100. If unspecified, server will pick 50 as an approperiate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + # syntax. + # + # ListMessages allows filtering by: + # * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + # * update_time + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.new + # + # # Call the list_messages method. + # result = client.list_messages 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::GeminiDataAnalytics::V1beta::StorageMessage. + # p item + # end + # + def list_messages request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest + + # Converts hash and nil to an 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_messages.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_messages.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_messages.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.list_messages request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_chat_service_stub, :list_messages, "messages", 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 + + ## + # Queries data from a natural language user query. + # + # @overload query_data(request, options = nil) + # Pass arguments to `query_data` via a request object, either of type + # {::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload query_data(parent: nil, prompt: nil, context: nil, generation_options: nil) + # Pass arguments to `query_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource to generate the query for. + # Format: projects/\\{project}/locations/\\{location} + # @param prompt [::String] + # Required. The natural language query for which to generate query. + # Example: "What are the top 5 best selling products this month?" + # @param context [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataContext, ::Hash] + # Required. The context for the data query, including the data sources to + # use. + # @param generation_options [::Google::Cloud::GeminiDataAnalytics::V1beta::GenerationOptions, ::Hash] + # Optional. Options to control query generation and execution behavior. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gemini_data_analytics/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new + # + # # Call the query_data method. + # result = client.query_data request + # + # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse. + # p result + # + def query_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.query_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_data.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_chat_service_stub.query_data 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 DataChatService REST API. + # + # This class represents the configuration for DataChatService 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::GeminiDataAnalytics::V1beta::DataChatService::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 + # # chat to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.chat.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.chat.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 = "geminidataanalytics.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 + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, 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 DataChatService 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 `chat` + # @return [::Gapic::Config::Method] + # + attr_reader :chat + ## + # RPC-specific configuration for `create_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_conversation + ## + # RPC-specific configuration for `delete_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_conversation + ## + # RPC-specific configuration for `get_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_conversation + ## + # RPC-specific configuration for `list_conversations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_conversations + ## + # RPC-specific configuration for `list_messages` + # @return [::Gapic::Config::Method] + # + attr_reader :list_messages + ## + # RPC-specific configuration for `query_data` + # @return [::Gapic::Config::Method] + # + attr_reader :query_data + + # @private + def initialize parent_rpcs = nil + chat_config = parent_rpcs.chat if parent_rpcs.respond_to? :chat + @chat = ::Gapic::Config::Method.new chat_config + create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation + @create_conversation = ::Gapic::Config::Method.new create_conversation_config + delete_conversation_config = parent_rpcs.delete_conversation if parent_rpcs.respond_to? :delete_conversation + @delete_conversation = ::Gapic::Config::Method.new delete_conversation_config + get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation + @get_conversation = ::Gapic::Config::Method.new get_conversation_config + list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations + @list_conversations = ::Gapic::Config::Method.new list_conversations_config + list_messages_config = parent_rpcs.list_messages if parent_rpcs.respond_to? :list_messages + @list_messages = ::Gapic::Config::Method.new list_messages_config + query_data_config = parent_rpcs.query_data if parent_rpcs.respond_to? :query_data + @query_data = ::Gapic::Config::Method.new query_data_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb new file mode 100644 index 000000000000..bf05e97b4bee --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb @@ -0,0 +1,505 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_chat_service_pb" + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + module DataChatService + module Rest + ## + # REST service stub for the DataChatService 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 chat REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yieldparam chunk [::String] The chunk of data received during server streaming. + # + # @return [::Gapic::Rest::TransportOperation] + def chat(request_pb, options = nil, &) + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_chat_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "chat", + options: options, + is_server_streaming: true, + & + ) + ::Gapic::Rest::TransportOperation.new response + end + + ## + # Baseline implementation for the create_conversation REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GeminiDataAnalytics::V1beta::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # A result object deserialized from the server's reply + def create_conversation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_conversation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_conversation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.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_conversation REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_conversation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_conversation", + 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 get_conversation REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GeminiDataAnalytics::V1beta::Conversation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # A result object deserialized from the server's reply + def get_conversation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_conversation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_conversation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.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_conversations REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GeminiDataAnalytics::V1beta::ListConversationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse] + # A result object deserialized from the server's reply + def list_conversations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_conversations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_conversations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse.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_messages REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GeminiDataAnalytics::V1beta::ListMessagesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse] + # A result object deserialized from the server's reply + def list_messages request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_messages_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_messages", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the query_data REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::GeminiDataAnalytics::V1beta::QueryDataResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse] + # A result object deserialized from the server's reply + def query_data request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_query_data_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "query_data", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse.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 chat REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_chat_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}:chat", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_conversation REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest] + # 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_conversation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/conversations", + body: "conversation", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_conversation REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest] + # 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_conversation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_conversation REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest] + # 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_conversation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_conversations REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest] + # 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_conversations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/conversations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_messages REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest] + # 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_messages_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/messages", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the query_data REST call + # + # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_data_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}:queryData", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb new file mode 100644 index 000000000000..90ac15f9c547 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gemini_data_analytics/v1beta/data_agent_service/rest" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest" +require "google/cloud/gemini_data_analytics/v1beta/bindings_override" +require "google/cloud/gemini_data_analytics/v1beta/version" + +module Google + module Cloud + module GeminiDataAnalytics + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/gemini_data_analytics/v1beta/rest" + # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new + # + module V1beta + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/version.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/version.rb new file mode 100644 index 000000000000..664bc4354207 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/agent_context_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/agent_context_pb.rb new file mode 100644 index 000000000000..d2772f18e68b --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/agent_context_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/geminidataanalytics/v1beta/agent_context.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n;google/cloud/geminidataanalytics/v1beta/agent_context.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"4\n\x15\x41gentContextReference\x12\x1b\n\x0e\x63ontext_set_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xa2\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x11\x41gentContextProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + AgentContextReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AgentContextReference").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb new file mode 100644 index 000000000000..07f3032f172d --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/geminidataanalytics/v1beta/context.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/geminidataanalytics/v1beta/datasource_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n5google/cloud/geminidataanalytics/v1beta/context.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/datasource.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xd9\x08\n\x07\x43ontext\x12\x1f\n\x12system_instruction\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x15\x64\x61tasource_references\x18\x07 \x01(\x0b\x32=.google.cloud.geminidataanalytics.v1beta.DatasourceReferencesB\x03\xe0\x41\x02\x12R\n\x07options\x18\x03 \x01(\x0b\x32<.google.cloud.geminidataanalytics.v1beta.ConversationOptionsB\x03\xe0\x41\x01\x12S\n\x0f\x65xample_queries\x18\x05 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ExampleQueryB\x03\xe0\x41\x01\x12^\n\x15looker_golden_queries\x18\x0b \x03(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.LookerGoldenQueryB\x03\xe0\x41\x01\x12R\n\x0eglossary_terms\x18\x08 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.GlossaryTermB\x03\xe0\x41\x01\x12\x66\n\x14schema_relationships\x18\t \x03(\x0b\x32\x43.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationshipB\x03\xe0\x41\x01\x1a\x84\x04\n\x12SchemaRelationship\x12j\n\x11left_schema_paths\x18\x01 \x01(\x0b\x32O.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths\x12k\n\x12right_schema_paths\x18\x02 \x01(\x0b\x32O.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths\x12[\n\x07sources\x18\x03 \x03(\x0e\x32J.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.Source\x12\x18\n\x10\x63onfidence_score\x18\x04 \x01(\x02\x1a/\n\x0bSchemaPaths\x12\x11\n\ttable_fqn\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\"m\n\x06Source\x12\x16\n\x12SOURCE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x42IGQUERY_JOB_HISTORY\x10\x01\x12\x11\n\rLLM_SUGGESTED\x10\x02\x12\x1e\n\x1a\x42IGQUERY_TABLE_CONSTRAINTS\x10\x03\"Y\n\x0c\x45xampleQuery\x12\x18\n\tsql_query\x18\x65 \x01(\tB\x03\xe0\x41\x01H\x00\x12&\n\x19natural_language_question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x07\n\x05query\"\x8d\x01\n\x11LookerGoldenQuery\x12\'\n\x1anatural_language_questions\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12O\n\x0clooker_query\x18\x05 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x03\xe0\x41\x01\"\x88\x02\n\x0bLookerQuery\x12\x12\n\x05model\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x65xplore\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ields\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12Q\n\x07\x66ilters\x18\x04 \x03(\x0b\x32;.google.cloud.geminidataanalytics.v1beta.LookerQuery.FilterB\x03\xe0\x41\x01\x12\x12\n\x05sorts\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x17\n\x05limit\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\x30\n\x06\x46ilter\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x08\n\x06_limit\"X\n\x0cGlossaryTerm\x12\x19\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06labels\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x86\x02\n\x13\x43onversationOptions\x12I\n\x05\x63hart\x18\x01 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ChartOptionsB\x03\xe0\x41\x01\x12O\n\x08\x61nalysis\x18\x02 \x01(\x0b\x32\x38.google.cloud.geminidataanalytics.v1beta.AnalysisOptionsB\x03\xe0\x41\x01\x12S\n\ndatasource\x18\x03 \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.DatasourceOptionsB\x03\xe0\x41\x01\"Y\n\x11\x44\x61tasourceOptions\x12\x44\n\x1a\x62ig_query_max_billed_bytes\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x03\xe0\x41\x01\"\xd6\x02\n\x0c\x43hartOptions\x12V\n\x05image\x18\x01 \x01(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptionsB\x03\xe0\x41\x01\x1a\xed\x01\n\x0cImageOptions\x12^\n\x08no_image\x18\x01 \x01(\x0b\x32J.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImageH\x00\x12\\\n\x03svg\x18\x02 \x01(\x0b\x32M.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptionsH\x00\x1a\t\n\x07NoImage\x1a\x0c\n\nSvgOptionsB\x06\n\x04kind\"\x87\x01\n\x0f\x41nalysisOptions\x12T\n\x06python\x18\x01 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.PythonB\x03\xe0\x41\x01\x1a\x1e\n\x06Python\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x42\x9d\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x0c\x43ontextProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.geminidataanalytics.v1beta.DatasourceReferences", "google/cloud/geminidataanalytics/v1beta/datasource.proto"], + ["google.protobuf.Int64Value", "google/protobuf/wrappers.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + Context = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context").msgclass + Context::SchemaRelationship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship").msgclass + Context::SchemaRelationship::SchemaPaths = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths").msgclass + Context::SchemaRelationship::Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.Source").enummodule + ExampleQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExampleQuery").msgclass + LookerGoldenQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery").msgclass + LookerQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerQuery").msgclass + LookerQuery::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter").msgclass + GlossaryTerm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.GlossaryTerm").msgclass + ConversationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ConversationOptions").msgclass + DatasourceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DatasourceOptions").msgclass + ChartOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions").msgclass + ChartOptions::ImageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions").msgclass + ChartOptions::ImageOptions::NoImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage").msgclass + ChartOptions::ImageOptions::SvgOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions").msgclass + AnalysisOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisOptions").msgclass + AnalysisOptions::Python = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb new file mode 100644 index 000000000000..cf279d48f240 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/geminidataanalytics/v1beta/conversation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n:google/cloud/geminidataanalytics/v1beta/conversation.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x03\n\x0c\x43onversation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x08\x12\x13\n\x06\x61gents\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\x37\n\x0elast_used_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x06labels\x18\t \x03(\x0b\x32\x41.google.cloud.geminidataanalytics.v1beta.Conversation.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x98\x01\xea\x41\x94\x01\n/geminidataanalytics.googleapis.com/Conversation\x12\x44projects/{project}/locations/{location}/conversations/{conversation}*\rconversations2\x0c\x63onversation\"\xf5\x01\n\x19\x43reateConversationRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/geminidataanalytics.googleapis.com/Conversation\x12\x1c\n\x0f\x63onversation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12P\n\x0c\x63onversation\x18\x03 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ConversationB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"_\n\x16GetConversationRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/Conversation\"\xa9\x01\n\x18ListConversationsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/geminidataanalytics.googleapis.com/Conversation\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\"\x82\x01\n\x19ListConversationsResponse\x12L\n\rconversations\x18\x01 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x19\x44\x65leteConversationRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/ConversationB\xa2\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x11\x43onversationProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + Conversation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Conversation").msgclass + CreateConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.CreateConversationRequest").msgclass + GetConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.GetConversationRequest").msgclass + ListConversationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListConversationsRequest").msgclass + ListConversationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListConversationsResponse").msgclass + DeleteConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DeleteConversationRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/credentials_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/credentials_pb.rb new file mode 100644 index 000000000000..12112d8f0b2c --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/credentials_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/geminidataanalytics/v1beta/credentials.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n9google/cloud/geminidataanalytics/v1beta/credentials.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"a\n\x0b\x43redentials\x12J\n\x05oauth\x18\x01 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.OAuthCredentialsH\x00\x42\x06\n\x04kind\"\xb6\x02\n\x10OAuthCredentials\x12W\n\x06secret\x18\x02 \x01(\x0b\x32\x45.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBasedH\x00\x12U\n\x05token\x18\x03 \x01(\x0b\x32\x44.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBasedH\x00\x1a\x41\n\x0bSecretBased\x12\x16\n\tclient_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rclient_secret\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\'\n\nTokenBased\x12\x19\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x06\n\x04kindB\xa1\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x10\x43redentialsProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + Credentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Credentials").msgclass + OAuthCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.OAuthCredentials").msgclass + OAuthCredentials::SecretBased = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased").msgclass + OAuthCredentials::TokenBased = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb new file mode 100644 index 000000000000..b80b143685c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/geminidataanalytics/v1beta/data_agent.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n8google/cloud/geminidataanalytics/v1beta/data_agent.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x42google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa3\x05\n\tDataAgent\x12[\n\x14\x64\x61ta_analytics_agent\x18\x65 \x01(\x0b\x32;.google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgentH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x05 \x03(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.DataAgent.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\npurge_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8a\x01\xea\x41\x86\x01\n,geminidataanalytics.googleapis.com/DataAgent\x12?projects/{project}/locations/{location}/dataAgents/{data_agent}*\ndataAgents2\tdataAgentB\x06\n\x04typeB\x9f\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x0e\x44\x61taAgentProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent", "google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + DataAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataAgent").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb new file mode 100644 index 000000000000..23b106eb2d31 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/geminidataanalytics/v1beta/data_agent_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/geminidataanalytics/v1beta/data_agent_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n@google/cloud/geminidataanalytics/v1beta/data_agent_service.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/data_agent.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\x01\n\x15ListDataAgentsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,geminidataanalytics.googleapis.com/DataAgent\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\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\x94\x01\n\x16ListDataAgentsResponse\x12G\n\x0b\x64\x61ta_agents\x18\x01 \x03(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataAgent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"\xb7\x03\n\x1fListAccessibleDataAgentsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,geminidataanalytics.googleapis.com/DataAgent\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\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12s\n\x0e\x63reator_filter\x18\x07 \x01(\x0e\x32V.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilterB\x03\xe0\x41\x01\"a\n\rCreatorFilter\x12\x1e\n\x1a\x43REATOR_FILTER_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x10\n\x0c\x43REATOR_ONLY\x10\x02\x12\x14\n\x10NOT_CREATOR_ONLY\x10\x03\"\x9e\x01\n ListAccessibleDataAgentsResponse\x12G\n\x0b\x64\x61ta_agents\x18\x01 \x03(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataAgent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"Y\n\x13GetDataAgentRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,geminidataanalytics.googleapis.com/DataAgent\"\xe8\x01\n\x16\x43reateDataAgentRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,geminidataanalytics.googleapis.com/DataAgent\x12\x1a\n\rdata_agent_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\ndata_agent\x18\x03 \x01(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataAgentB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xbc\x01\n\x16UpdateDataAgentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12K\n\ndata_agent\x18\x02 \x01(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataAgentB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"}\n\x16\x44\x65leteDataAgentRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,geminidataanalytics.googleapis.com/DataAgent\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xc3\x0e\n\x10\x44\x61taAgentService\x12\xd6\x01\n\x0eListDataAgents\x12>.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest\x1a?.google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1beta/{parent=projects/*/locations/*}/dataAgents\x12\x83\x02\n\x18ListAccessibleDataAgents\x12H.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest\x1aI.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta/{parent=projects/*/locations/*}/dataAgents:listAccessible\x12\xc3\x01\n\x0cGetDataAgent\x12<.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest\x1a\x32.google.cloud.geminidataanalytics.v1beta.DataAgent\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1beta/{name=projects/*/locations/*/dataAgents/*}\x12\xfd\x01\n\x0f\x43reateDataAgent\x12?.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1e\n\tDataAgent\x12\x11OperationMetadata\xda\x41\x1fparent,data_agent,data_agent_id\x82\xd3\xe4\x93\x02@\"2/v1beta/{parent=projects/*/locations/*}/dataAgents:\ndata_agent\x12\xff\x01\n\x0fUpdateDataAgent\x12?.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41\x1e\n\tDataAgent\x12\x11OperationMetadata\xda\x41\x16\x64\x61ta_agent,update_mask\x82\xd3\xe4\x93\x02K2=/v1beta/{data_agent.name=projects/*/locations/*/dataAgents/*}:\ndata_agent\x12\xe1\x01\n\x0f\x44\x65leteDataAgent\x12?.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1beta/{name=projects/*/locations/*/dataAgents/*}\x12\xa4\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Y\xda\x41\x08resource\x82\xd3\xe4\x93\x02H\"C/v1beta/{resource=projects/*/locations/*/dataAgents/*}:getIamPolicy:\x01*\x12\xa4\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Y\xda\x41\x08resource\x82\xd3\xe4\x93\x02H\"C/v1beta/{resource=projects/*/locations/*/dataAgents/*}:setIamPolicy:\x01*\x1aV\xca\x41\"geminidataanalytics.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa6\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x15\x44\x61taAgentServiceProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.geminidataanalytics.v1beta.DataAgent", "google/cloud/geminidataanalytics/v1beta/data_agent.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + ListDataAgentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest").msgclass + ListDataAgentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse").msgclass + ListAccessibleDataAgentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest").msgclass + ListAccessibleDataAgentsRequest::CreatorFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter").enummodule + ListAccessibleDataAgentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse").msgclass + GetDataAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest").msgclass + CreateDataAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest").msgclass + UpdateDataAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest").msgclass + DeleteDataAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb new file mode 100644 index 000000000000..25d720ede640 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb @@ -0,0 +1,60 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/geminidataanalytics/v1beta/data_agent_service.proto for package 'Google.Cloud.GeminiDataAnalytics.V1beta' +# 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/geminidataanalytics/v1beta/data_agent_service_pb' + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + module DataAgentService + # Service describing handlers for resources. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.geminidataanalytics.v1beta.DataAgentService' + + # Lists DataAgents in a given project and location. + rpc :ListDataAgents, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse + # Lists DataAgents that are accessible to the caller in a given project and + # location. + rpc :ListAccessibleDataAgents, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse + # Gets details of a single DataAgent. + rpc :GetDataAgent, ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent + # Creates a new DataAgent in a given project and location. + rpc :CreateDataAgent, ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single DataAgent. + rpc :UpdateDataAgent, ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest, ::Google::Longrunning::Operation + # Deletes a single DataAgent. + rpc :DeleteDataAgent, ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest, ::Google::Longrunning::Operation + # Gets the IAM policy for DataAgent + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the IAM policy for a DataAgent. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb.rb new file mode 100644 index 000000000000..968364224f3a --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/geminidataanalytics/v1beta/context_pb' + + +descriptor_data = "\nBgoogle/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x35google/cloud/geminidataanalytics/v1beta/context.proto\"\x8d\x02\n\x12\x44\x61taAnalyticsAgent\x12N\n\x0fstaging_context\x18\x05 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x01\x12P\n\x11published_context\x18\x06 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x01\x12U\n\x16last_published_context\x18\x07 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x03\x42\xa8\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x17\x44\x61taAnalyticsAgentProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.geminidataanalytics.v1beta.Context", "google/cloud/geminidataanalytics/v1beta/context.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + DataAnalyticsAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb new file mode 100644 index 000000000000..52eacbac70aa --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/geminidataanalytics/v1beta/data_chat_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/geminidataanalytics/v1beta/context_pb' +require 'google/cloud/geminidataanalytics/v1beta/conversation_pb' +require 'google/cloud/geminidataanalytics/v1beta/credentials_pb' +require 'google/cloud/geminidataanalytics/v1beta/datasource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n?google/cloud/geminidataanalytics/v1beta/data_chat_service.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/geminidataanalytics/v1beta/context.proto\x1a:google/cloud/geminidataanalytics/v1beta/conversation.proto\x1a\x39google/cloud/geminidataanalytics/v1beta/credentials.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/datasource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x02\n\x10QueryDataRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.QueryDataContextB\x03\xe0\x41\x02\x12[\n\x12generation_options\x18\x04 \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.GenerationOptionsB\x03\xe0\x41\x01\"\xb8\x01\n\x11GenerationOptions\x12\"\n\x15generate_query_result\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n generate_natural_language_answer\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12!\n\x14generate_explanation\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n generate_disambiguation_question\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"u\n\x10QueryDataContext\x12\x61\n\x15\x64\x61tasource_references\x18\x01 \x01(\x0b\x32=.google.cloud.geminidataanalytics.v1beta.DatasourceReferencesB\x03\xe0\x41\x02\"\xde\x01\n\x11QueryDataResponse\x12\x17\n\x0fgenerated_query\x18\x01 \x01(\t\x12\x1a\n\x12intent_explanation\x18\x02 \x01(\t\x12R\n\x0cquery_result\x18\x03 \x01(\x0b\x32<.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult\x12\x1f\n\x17natural_language_answer\x18\x04 \x01(\t\x12\x1f\n\x17\x64isambiguation_question\x18\x05 \x03(\t\"\xa4\x03\n\x13\x45xecutedQueryResult\x12T\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x43.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column\x12N\n\x04rows\x18\x02 \x03(\x0b\x32@.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row\x12\x17\n\x0ftotal_row_count\x18\x03 \x01(\x03\x12\x16\n\x0epartial_result\x18\x04 \x01(\x08\x12\x1d\n\x15query_execution_error\x18\x05 \x01(\t\x1a$\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x1a\x16\n\x05Value\x12\r\n\x05value\x18\x01 \x01(\t\x1aY\n\x03Row\x12R\n\x06values\x18\x01 \x03(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value\"\xa4\x01\n\x13ListMessagesRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/Conversation\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x14ListMessagesResponse\x12I\n\x08messages\x18\x01 \x03(\x0b\x32\x37.google.cloud.geminidataanalytics.v1beta.StorageMessage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"g\n\x0eStorageMessage\x12\x12\n\nmessage_id\x18\x01 \x01(\t\x12\x41\n\x07message\x18\x02 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.Message\"\xd4\x04\n\x0b\x43hatRequest\x12O\n\x0einline_context\x18\x65 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x01H\x00\x12\x65\n\x16\x63onversation_reference\x18g \x01(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.ConversationReferenceB\x03\xe0\x41\x01H\x00\x12\\\n\x12\x64\x61ta_agent_context\x18h \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.DataAgentContextB\x03\xe0\x41\x01H\x00\x12u\n\x1f\x63lient_managed_resource_context\x18i \x01(\x0b\x32\x45.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContextB\x03\xe0\x41\x01H\x00\x12\x46\n\x07project\x18\x01 \x01(\tB5\x18\x01\xe0\x41\x01\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x08messages\x18\x02 \x03(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.MessageB\x03\xe0\x41\x02\x42\x12\n\x10\x63ontext_provider\"\xe3\x02\n\x10\x44\x61taAgentContext\x12H\n\ndata_agent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,geminidataanalytics.googleapis.com/DataAgent\x12N\n\x0b\x63redentials\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.CredentialsB\x03\xe0\x41\x01\x12\x66\n\x0f\x63ontext_version\x18\x03 \x01(\x0e\x32H.google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersionB\x03\xe0\x41\x01\"M\n\x0e\x43ontextVersion\x12\x1f\n\x1b\x43ONTEXT_VERSION_UNSPECIFIED\x10\x00\x12\x0b\n\x07STAGING\x10\x01\x12\r\n\tPUBLISHED\x10\x02\"\xc2\x01\n\x15\x43onversationReference\x12M\n\x0c\x63onversation\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/Conversation\x12Z\n\x12\x64\x61ta_agent_context\x18\x03 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.DataAgentContextB\x03\xe0\x41\x02\"\xa2\x01\n\x1c\x43lientManagedResourceContext\x12M\n\x0einline_context\x18\x01 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x02\x12\x1c\n\x0f\x63onversation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61gent_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xfe\x01\n\x07Message\x12L\n\x0cuser_message\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.UserMessageH\x00\x12P\n\x0esystem_message\x18\x03 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.SystemMessageH\x00\x12\x32\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nmessage_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x06\n\x04kind\"%\n\x0bUserMessage\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\"\xc8\x04\n\rSystemMessage\x12\x44\n\x04text\x18\x01 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.TextMessageH\x00\x12H\n\x06schema\x18\x02 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.SchemaMessageH\x00\x12\x44\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.DataMessageH\x00\x12L\n\x08\x61nalysis\x18\x04 \x01(\x0b\x32\x38.google.cloud.geminidataanalytics.v1beta.AnalysisMessageH\x00\x12\x46\n\x05\x63hart\x18\x05 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ChartMessageH\x00\x12\x46\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ErrorMessageH\x00\x12W\n\x0f\x65xample_queries\x18\r \x01(\x0b\x32\x37.google.cloud.geminidataanalytics.v1beta.ExampleQueriesB\x03\xe0\x41\x01H\x00\x12\x15\n\x08group_id\x18\x0c \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04kindB\x0b\n\t_group_id\"\xce\x01\n\x0bTextMessage\x12\x12\n\x05parts\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12U\n\ttext_type\x18\x02 \x01(\x0e\x32=.google.cloud.geminidataanalytics.v1beta.TextMessage.TextTypeB\x03\xe0\x41\x01\"T\n\x08TextType\x12\x19\n\x15TEXT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46INAL_RESPONSE\x10\x01\x12\x0b\n\x07THOUGHT\x10\x02\x12\x0c\n\x08PROGRESS\x10\x03\"\xa7\x01\n\rSchemaMessage\x12\x45\n\x05query\x18\x01 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.SchemaQueryH\x00\x12G\n\x06result\x18\x02 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.SchemaResultH\x00\x42\x06\n\x04kind\"$\n\x0bSchemaQuery\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\"]\n\x0cSchemaResult\x12M\n\x0b\x64\x61tasources\x18\x01 \x03(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DatasourceB\x03\xe0\x41\x01\"\xe5\x02\n\x0b\x44\x61taMessage\x12\x43\n\x05query\x18\x01 \x01(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataQueryH\x00\x12\x17\n\rgenerated_sql\x18\x02 \x01(\tH\x00\x12\x45\n\x06result\x18\x03 \x01(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DataResultH\x00\x12Z\n\x16generated_looker_query\x18\x04 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x02\x18\x01H\x00\x12M\n\rbig_query_job\x18\x05 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.BigQueryJobH\x00\x42\x06\n\x04kind\"\xdf\x01\n\tDataQuery\x12K\n\x06looker\x18\x04 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x03\xe0\x41\x01H\x00\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12M\n\x0b\x64\x61tasources\x18\x02 \x03(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DatasourceB\x03\xe0\x41\x01\x42\x0c\n\nquery_type\"\x91\x01\n\nDataResult\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06schema\x18\x05 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\x12*\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\xf9\x01\n\x0b\x42igQueryJob\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08location\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12_\n\x11\x64\x65stination_table\x18\x03 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferenceB\x03\xe0\x41\x01\x12\x44\n\x06schema\x18\x07 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\"\xb4\x01\n\x0f\x41nalysisMessage\x12G\n\x05query\x18\x01 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.AnalysisQueryH\x00\x12P\n\x0eprogress_event\x18\x02 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.AnalysisEventH\x00\x42\x06\n\x04kind\"F\n\rAnalysisQuery\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x64\x61ta_result_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\xaa\x02\n\rAnalysisEvent\x12\x1b\n\x11planner_reasoning\x18\x02 \x01(\tH\x00\x12\x1b\n\x11\x63oder_instruction\x18\x03 \x01(\tH\x00\x12\x0e\n\x04\x63ode\x18\x04 \x01(\tH\x00\x12\x1a\n\x10\x65xecution_output\x18\x05 \x01(\tH\x00\x12\x19\n\x0f\x65xecution_error\x18\x06 \x01(\tH\x00\x12 \n\x16result_vega_chart_json\x18\x07 \x01(\tH\x00\x12!\n\x17result_natural_language\x18\x08 \x01(\tH\x00\x12\x19\n\x0fresult_csv_data\x18\t \x01(\tH\x00\x12\x1f\n\x15result_reference_data\x18\n \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x0b \x01(\tH\x00\x42\x06\n\x04kind\"\xa4\x01\n\x0c\x43hartMessage\x12\x44\n\x05query\x18\x01 \x01(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.ChartQueryH\x00\x12\x46\n\x06result\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.ChartResultH\x00\x42\x06\n\x04kind\"F\n\nChartQuery\x12\x19\n\x0cinstructions\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x61ta_result_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x0b\x43hartResult\x12\x31\n\x0bvega_config\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x41\n\x05image\x18\x03 \x01(\x0b\x32-.google.cloud.geminidataanalytics.v1beta.BlobB\x03\xe0\x41\x01\"!\n\x0c\x45rrorMessage\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x03\"e\n\x0e\x45xampleQueries\x12S\n\x0f\x65xample_queries\x18\x01 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ExampleQueryB\x03\xe0\x41\x01\"1\n\x04\x42lob\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x32\xae\x0c\n\x0f\x44\x61taChatService\x12\xa9\x01\n\x04\x43hat\x12\x34.google.cloud.geminidataanalytics.v1beta.ChatRequest\x1a\x30.google.cloud.geminidataanalytics.v1beta.Message\"7\x82\xd3\xe4\x93\x02\x31\",/v1beta/{parent=projects/*/locations/*}:chat:\x01*0\x01\x12\x82\x02\n\x12\x43reateConversation\x12\x42.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest\x1a\x35.google.cloud.geminidataanalytics.v1beta.Conversation\"q\xda\x41#parent,conversation,conversation_id\x82\xd3\xe4\x93\x02\x45\"5/v1beta/{parent=projects/*/locations/*}/conversations:\x0c\x63onversation\x12\xb6\x01\n\x12\x44\x65leteConversation\x12\x42.google.cloud.geminidataanalytics.v1beta.DeleteConversationRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta/{name=projects/*/locations/*/conversations/*}\x12\xcf\x01\n\x0fGetConversation\x12?.google.cloud.geminidataanalytics.v1beta.GetConversationRequest\x1a\x35.google.cloud.geminidataanalytics.v1beta.Conversation\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/conversations/*}\x12\xe2\x01\n\x11ListConversations\x12\x41.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest\x1a\x42.google.cloud.geminidataanalytics.v1beta.ListConversationsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*}/conversations\x12\xde\x01\n\x0cListMessages\x12<.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest\x1a=.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1beta/{parent=projects/*/locations/*/conversations/*}/messages\x12\xc0\x01\n\tQueryData\x12\x39.google.cloud.geminidataanalytics.v1beta.QueryDataRequest\x1a:.google.cloud.geminidataanalytics.v1beta.QueryDataResponse\"<\x82\xd3\xe4\x93\x02\x36\"1/v1beta/{parent=projects/*/locations/*}:queryData:\x01*\x1aV\xca\x41\"geminidataanalytics.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa5\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x14\x44\x61taChatServiceProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.geminidataanalytics.v1beta.DatasourceReferences", "google/cloud/geminidataanalytics/v1beta/datasource.proto"], + ["google.cloud.geminidataanalytics.v1beta.Context", "google/cloud/geminidataanalytics/v1beta/context.proto"], + ["google.cloud.geminidataanalytics.v1beta.Credentials", "google/cloud/geminidataanalytics/v1beta/credentials.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + QueryDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.QueryDataRequest").msgclass + GenerationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.GenerationOptions").msgclass + QueryDataContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.QueryDataContext").msgclass + QueryDataResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.QueryDataResponse").msgclass + ExecutedQueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult").msgclass + ExecutedQueryResult::Column = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column").msgclass + ExecutedQueryResult::Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value").msgclass + ExecutedQueryResult::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row").msgclass + ListMessagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListMessagesRequest").msgclass + ListMessagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListMessagesResponse").msgclass + StorageMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.StorageMessage").msgclass + ChatRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChatRequest").msgclass + DataAgentContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataAgentContext").msgclass + DataAgentContext::ContextVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion").enummodule + ConversationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ConversationReference").msgclass + ClientManagedResourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext").msgclass + Message = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Message").msgclass + UserMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.UserMessage").msgclass + SystemMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SystemMessage").msgclass + TextMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.TextMessage").msgclass + TextMessage::TextType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.TextMessage.TextType").enummodule + SchemaMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SchemaMessage").msgclass + SchemaQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SchemaQuery").msgclass + SchemaResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SchemaResult").msgclass + DataMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataMessage").msgclass + DataQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataQuery").msgclass + DataResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataResult").msgclass + BigQueryJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.BigQueryJob").msgclass + AnalysisMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisMessage").msgclass + AnalysisQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisQuery").msgclass + AnalysisEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisEvent").msgclass + ChartMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartMessage").msgclass + ChartQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartQuery").msgclass + ChartResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartResult").msgclass + ErrorMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ErrorMessage").msgclass + ExampleQueries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExampleQueries").msgclass + Blob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Blob").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb new file mode 100644 index 000000000000..a5721a4a2fc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/geminidataanalytics/v1beta/data_chat_service.proto for package 'Google.Cloud.GeminiDataAnalytics.V1beta' +# 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/geminidataanalytics/v1beta/data_chat_service_pb' + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + module DataChatService + # Service to ask a natural language question on top of BigQuery + # and Looker Studio datasources to get back streamed responses of various kinds + # to help provide a rich conversational answer. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.geminidataanalytics.v1beta.DataChatService' + + # Answers a data question by generating a stream of + # [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects. + rpc :Chat, ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest, stream(::Google::Cloud::GeminiDataAnalytics::V1beta::Message) + # Creates a new conversation to persist the conversation history. Each + # conversation will have multiple messages associated with it. + rpc :CreateConversation, ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation + # Deletes a conversation. + rpc :DeleteConversation, ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest, ::Google::Protobuf::Empty + # Gets details of a single conversation by using conversation id and parent. + rpc :GetConversation, ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation + # Lists all conversations for a given parent. + rpc :ListConversations, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse + # Lists all messages for a given conversation. + rpc :ListMessages, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse + # Queries data from a natural language user query. + rpc :QueryData, ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb new file mode 100644 index 000000000000..8c072f6d9654 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/geminidataanalytics/v1beta/datasource.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/cloud/geminidataanalytics/v1beta/agent_context_pb' +require 'google/cloud/geminidataanalytics/v1beta/credentials_pb' +require 'google/protobuf/struct_pb' + + +descriptor_data = "\n8google/cloud/geminidataanalytics/v1beta/datasource.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a;google/cloud/geminidataanalytics/v1beta/agent_context.proto\x1a\x39google/cloud/geminidataanalytics/v1beta/credentials.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xa0\x04\n\x14\x44\x61tasourceReferences\x12N\n\x02\x62q\x18\x01 \x01(\x0b\x32@.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferencesH\x00\x12U\n\x06studio\x18\x02 \x01(\x0b\x32\x43.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferencesH\x00\x12R\n\x06looker\x18\x03 \x01(\x0b\x32@.google.cloud.geminidataanalytics.v1beta.LookerExploreReferencesH\x00\x12L\n\x07\x61lloydb\x18\x08 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.AlloyDbReferenceH\x00\x12V\n\x11spanner_reference\x18\t \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.SpannerReferenceH\x00\x12Y\n\x13\x63loud_sql_reference\x18\n \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.CloudSqlReferenceH\x00\x42\x0c\n\nreferences\"y\n\x17\x42igQueryTableReferences\x12^\n\x10table_references\x18\x01 \x03(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferenceB\x03\xe0\x41\x01\"\xa7\x01\n\x16\x42igQueryTableReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ndataset_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08table_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x06schema\x18\x06 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\"{\n\x1aStudioDatasourceReferences\x12]\n\x11studio_references\x18\x02 \x03(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference\"7\n\x19StudioDatasourceReference\x12\x1a\n\rdatasource_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xdc\x01\n\x10\x41lloyDbReference\x12\x62\n\x12\x64\x61tabase_reference\x18\x01 \x01(\x0b\x32\x41.google.cloud.geminidataanalytics.v1beta.AlloyDbDatabaseReferenceB\x03\xe0\x41\x02\x12\x64\n\x17\x61gent_context_reference\x18\x03 \x01(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.AgentContextReferenceB\x03\xe0\x41\x01\"\xad\x01\n\x18\x41lloyDbDatabaseReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binstance_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\ttable_ids\x18\x06 \x03(\tB\x03\xe0\x41\x01\"\xdc\x01\n\x10SpannerReference\x12\x62\n\x12\x64\x61tabase_reference\x18\x01 \x01(\x0b\x32\x41.google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReferenceB\x03\xe0\x41\x02\x12\x64\n\x17\x61gent_context_reference\x18\x02 \x01(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.AgentContextReferenceB\x03\xe0\x41\x01\"\xb5\x02\n\x18SpannerDatabaseReference\x12]\n\x06\x65ngine\x18\x06 \x01(\x0e\x32H.google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReference.EngineB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binstance_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\ttable_ids\x18\x05 \x03(\tB\x03\xe0\x41\x01\"@\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\x0e\n\nGOOGLE_SQL\x10\x01\x12\x0e\n\nPOSTGRESQL\x10\x02\"\xde\x01\n\x11\x43loudSqlReference\x12\x63\n\x12\x64\x61tabase_reference\x18\x01 \x01(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.CloudSqlDatabaseReferenceB\x03\xe0\x41\x02\x12\x64\n\x17\x61gent_context_reference\x18\x02 \x01(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.AgentContextReferenceB\x03\xe0\x41\x01\"\xb2\x02\n\x19\x43loudSqlDatabaseReference\x12^\n\x06\x65ngine\x18\x01 \x01(\x0e\x32I.google.cloud.geminidataanalytics.v1beta.CloudSqlDatabaseReference.EngineB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binstance_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\ttable_ids\x18\x07 \x03(\tB\x03\xe0\x41\x01\";\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\x0e\n\nPOSTGRESQL\x10\x01\x12\t\n\x05MYSQL\x10\x02\"\xcb\x01\n\x17LookerExploreReferences\x12`\n\x12\x65xplore_references\x18\x01 \x03(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.LookerExploreReferenceB\x03\xe0\x41\x02\x12N\n\x0b\x63redentials\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.CredentialsB\x03\xe0\x41\x01\"\xa6\x02\n\x16LookerExploreReference\x12\x1d\n\x13looker_instance_uri\x18\t \x01(\tH\x00\x12j\n\x1cprivate_looker_instance_info\x18\n \x01(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfoH\x00\x12\x19\n\x0clookml_model\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x65xplore\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x06schema\x18\x08 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\x42\n\n\x08instance\"W\n\x19PrivateLookerInstanceInfo\x12\x1a\n\x12looker_instance_id\x18\x01 \x01(\t\x12\x1e\n\x16service_directory_name\x18\x02 \x01(\t\"\x8a\x05\n\nDatasource\x12\x63\n\x18\x62igquery_table_reference\x18\x01 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferenceH\x00\x12\x1e\n\x14studio_datasource_id\x18\x02 \x01(\tH\x00\x12\x63\n\x18looker_explore_reference\x18\x04 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.LookerExploreReferenceH\x00\x12W\n\x12\x61lloy_db_reference\x18\x0c \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.AlloyDbReferenceH\x00\x12V\n\x11spanner_reference\x18\r \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.SpannerReferenceH\x00\x12Y\n\x13\x63loud_sql_reference\x18\x0e \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.CloudSqlReferenceH\x00\x12\x44\n\x06schema\x18\x07 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\x12\x33\n\rstruct_schema\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x42\x0b\n\treference\"\xf7\x01\n\x06Schema\x12\x43\n\x06\x66ields\x18\x01 \x03(\x0b\x32..google.cloud.geminidataanalytics.v1beta.FieldB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08synonyms\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12I\n\x07\x66ilters\x18\x06 \x03(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DataFilterB\x03\xe0\x41\x01\"\x99\x02\n\x05\x46ield\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04mode\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08synonyms\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\tsubfields\x18\t \x03(\x0b\x32..google.cloud.geminidataanalytics.v1beta.FieldB\x03\xe0\x41\x01\x12\x15\n\x08\x63\x61tegory\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cvalue_format\x18\x0b \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\nDataFilter\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12J\n\x04type\x18\x03 \x01(\x0e\x32\x37.google.cloud.geminidataanalytics.v1beta.DataFilterTypeB\x03\xe0\x41\x01*E\n\x0e\x44\x61taFilterType\x12 \n\x1c\x44\x41TA_FILTER_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rALWAYS_FILTER\x10\x01\x42\xa0\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x0f\x44\x61tasourceProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.geminidataanalytics.v1beta.AgentContextReference", "google/cloud/geminidataanalytics/v1beta/agent_context.proto"], + ["google.cloud.geminidataanalytics.v1beta.Credentials", "google/cloud/geminidataanalytics/v1beta/credentials.proto"], + ["google.protobuf.Struct", "google/protobuf/struct.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GeminiDataAnalytics + module V1beta + DatasourceReferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DatasourceReferences").msgclass + BigQueryTableReferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences").msgclass + BigQueryTableReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.BigQueryTableReference").msgclass + StudioDatasourceReferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences").msgclass + StudioDatasourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference").msgclass + AlloyDbReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AlloyDbReference").msgclass + AlloyDbDatabaseReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AlloyDbDatabaseReference").msgclass + SpannerReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SpannerReference").msgclass + SpannerDatabaseReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReference").msgclass + SpannerDatabaseReference::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReference.Engine").enummodule + CloudSqlReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.CloudSqlReference").msgclass + CloudSqlDatabaseReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.CloudSqlDatabaseReference").msgclass + CloudSqlDatabaseReference::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.CloudSqlDatabaseReference.Engine").enummodule + LookerExploreReferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerExploreReferences").msgclass + LookerExploreReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerExploreReference").msgclass + PrivateLookerInstanceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo").msgclass + Datasource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Datasource").msgclass + Schema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Schema").msgclass + Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Field").msgclass + DataFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataFilter").msgclass + DataFilterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataFilterType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..de4bd2577d46 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Data Analytics API with Gemini V1BETA 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-gemini_data_analytics-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..c6b6b60729c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..fb9115c630af --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..cea53f02d1a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..b836bdb60b21 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..71b994c7ef20 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/agent_context.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/agent_context.rb new file mode 100644 index 000000000000..a978fc8f6913 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/agent_context.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + # Message representing a reference to Agent Context. + # @!attribute [rw] context_set_id + # @return [::String] + # Required. Context set ID to retrieve. + class AgentContextReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb new file mode 100644 index 000000000000..d2999b2a3911 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb @@ -0,0 +1,291 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + # A collection of context to apply to this conversation + # @!attribute [rw] system_instruction + # @return [::String] + # Optional. The basic entry point for data owners creating domain knowledge + # for Agent. + # + # Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age + # is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate) + # can help the model understand the business context around a user question. + # @!attribute [rw] datasource_references + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DatasourceReferences] + # Required. Data sources that are available for answering the question. + # @!attribute [rw] options + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ConversationOptions] + # Optional. Additional options for the conversation. + # @!attribute [rw] example_queries + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::ExampleQuery>] + # Optional. A list of example queries, providing examples of relevant and + # commonly used SQL queries and their corresponding natural language queries + # optionally present. Currently only used for BigQuery data sources. + # @!attribute [rw] looker_golden_queries + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::LookerGoldenQuery>] + # Optional. A list of golden queries, providing examples of relevant and + # commonly used Looker queries and their corresponding natural language + # queries optionally present. + # @!attribute [rw] glossary_terms + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::GlossaryTerm>] + # Optional. Term definitions (currently, only user authored) + # @!attribute [rw] schema_relationships + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Context::SchemaRelationship>] + # Optional. Relationships between table schema, including referencing and + # referenced columns. + class Context + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The relationship between two tables, including referencing and referenced + # columns. This is a derived context retrieved from Dataplex Dataset + # Insights. + # @!attribute [rw] left_schema_paths + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context::SchemaRelationship::SchemaPaths] + # An ordered list of fields for the join from the first table. + # The size of this list must be the same as `right_schema_paths`. + # Each field at index i in this list must correspond to a field at the same + # index in the `right_schema_paths` list. + # @!attribute [rw] right_schema_paths + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context::SchemaRelationship::SchemaPaths] + # An ordered list of fields for the join from the second table. + # The size of this list must be the same as `left_schema_paths`. + # Each field at index i in this list must correspond to a field at the same + # index in the `left_schema_paths` list. + # @!attribute [rw] sources + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Context::SchemaRelationship::Source>] + # Sources which generated the schema relation edge. + # @!attribute [rw] confidence_score + # @return [::Float] + # A confidence score for the suggested relationship. + # Manually added edges have the highest confidence score. + class SchemaRelationship + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents an ordered set of paths within the table schema. + # @!attribute [rw] table_fqn + # @return [::String] + # The service-qualified full resource name of the table + # Ex: + # bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID + # @!attribute [rw] paths + # @return [::Array<::String>] + # The ordered list of paths within the table schema. + class SchemaPaths + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Source which generated the schema relation edge. + module Source + # The source of the schema relationship is unspecified. + SOURCE_UNSPECIFIED = 0 + + # The source of the schema relationship is BigQuery job history. + BIGQUERY_JOB_HISTORY = 1 + + # The source of the schema relationship is LLM suggested. + LLM_SUGGESTED = 2 + + # The source of the schema relationship is BigQuery table constraints. + BIGQUERY_TABLE_CONSTRAINTS = 3 + end + end + end + + # Example of relevant and commonly used SQL query and its corresponding natural + # language queries optionally present. Currently only used for BigQuery data + # sources. + # @!attribute [rw] sql_query + # @return [::String] + # Optional. The SQL query that should be generated to answer the natural + # language question. For example: "SELECT COUNT(*) FROM orders WHERE + # order_date BETWEEN '2024-01-01' AND '2024-01-31'" + # @!attribute [rw] natural_language_question + # @return [::String] + # Optional. A natural language question that a user might ask. + # For example: "How many orders were placed last month?" + class ExampleQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A golden query for Looker, including natural language questions and a + # corresponding Looker Query. Analogous to ExampleQuery. + # @!attribute [rw] natural_language_questions + # @return [::Array<::String>] + # Optional. Natural language questions that a user might ask. + # For example: "How many orders were placed last month?" + # @!attribute [rw] looker_query + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery] + # Optional. The Looker Query corresponding to the natural language questions. + class LookerGoldenQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Looker Query Object + # [Looker API + # documentation](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query). + # @!attribute [rw] model + # @return [::String] + # Required. The LookML model used to generate the query. + # @!attribute [rw] explore + # @return [::String] + # Required. The LookML explore used to generate the query. + # @!attribute [rw] fields + # @return [::Array<::String>] + # Optional. The fields to retrieve from the explore. + # @!attribute [rw] filters + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery::Filter>] + # Optional. The filters to apply to the explore. + # @!attribute [rw] sorts + # @return [::Array<::String>] + # Optional. The sorts to apply to the explore. + # @!attribute [rw] limit + # @return [::String] + # Optional. Limit in the query. + class LookerQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A Looker query filter. + # @!attribute [rw] field + # @return [::String] + # Required. The field to filter on. + # @!attribute [rw] value + # @return [::String] + # Required. The value for the field to filter on. + class Filter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Definition of a term within a specific domain. + # @!attribute [rw] display_name + # @return [::String] + # Required. User friendly display name of the glossary term being defined. + # For example: "CTR", "conversion rate", "pending" + # @!attribute [rw] description + # @return [::String] + # Required. The description or meaning of the term. + # For example: "Click-through rate", "The percentage of users who complete a + # desired action", "An order that is waiting to be processed." + # @!attribute [rw] labels + # @return [::Array<::String>] + # Optional. A list of general purpose labels associated to this term. + # For example: ["click rate", "clickthrough", "waiting"] + class GlossaryTerm + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options for the conversation. + # @!attribute [rw] chart + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartOptions] + # Optional. Options for chart generation. + # @!attribute [rw] analysis + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AnalysisOptions] + # Optional. Options for analysis. + # @!attribute [rw] datasource + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DatasourceOptions] + # Optional. Options for datasources. + class ConversationOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options for datasources configurations. + # @!attribute [rw] big_query_max_billed_bytes + # @return [::Google::Protobuf::Int64Value] + # Optional. This option applies to datasources that require BigQuery queries + # only. Limits the bytes billed for each BQ query job. Queries that will have + # bytes billed beyond this limit will fail (without incurring a charge). + # If unspecified, no limit will be applied. + class DatasourceOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options for chart generation. + # @!attribute [rw] image + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartOptions::ImageOptions] + # Optional. When specified, the agent will render generated charts using the + # provided format. Defaults to no image. + class ChartOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Options for rendering images of generated charts. + # @!attribute [rw] no_image + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartOptions::ImageOptions::NoImage] + # No image. + # + # Note: The following fields are mutually exclusive: `no_image`, `svg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] svg + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartOptions::ImageOptions::SvgOptions] + # SVG format. + # + # Note: The following fields are mutually exclusive: `svg`, `no_image`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ImageOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # No image. + class NoImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SVG options. + class SvgOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Options for analysis. + # @!attribute [rw] python + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AnalysisOptions::Python] + # Optional. Options for Python analysis. + class AnalysisOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Options for Python analysis. + # @!attribute [rw] enabled + # @return [::Boolean] + # Optional. Whether to enable Python analysis. + # Defaults to false. + class Python + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb new file mode 100644 index 000000000000..6d7dd3768eee --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + # Message for a conversation. + # @!attribute [rw] name + # @return [::String] + # Optional. Identifier. The unique resource name of a conversation. Format: + # `projects/{project}/locations/{location}/conversations/{conversation_id}` + # `{conversation_id}` is the resource id and should be 63 characters or less + # and must match the format described in + # https://google.aip.dev/122#resource-id-segments + # + # Example: + # `projects/1234567890/locations/global/conversations/my-conversation`. + # + # It is recommended to skip setting this field during conversation creation + # as it will be inferred automatically and overwritten with the + # \\{parent}/conversations/\\{conversation_id}. + # @!attribute [rw] agents + # @return [::Array<::String>] + # Required. Agent(s) in the conversation. + # Currently, only one agent is supported. This field is repeated to allow + # for future support of multiple agents in a conversation. + # Format: `projects/{project}/locations/{location}/dataAgents/{agent}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp. + # @!attribute [r] last_used_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the last used conversation. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Open-ended and user-defined labels that can be set by the client + # to tag a conversation (e.g. to filter conversations for specific + # surfaces/products). + class Conversation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request for creating a conversation. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for CreateConversationRequest. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] conversation_id + # @return [::String] + # Optional. The conversation id of the conversation to create. + # Must be unique within the parent. + # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # If not provided, the server will auto-generate a value for the id. + # @!attribute [rw] conversation + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] + # Required. The conversation to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + class CreateConversationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting a conversation based on parent and conversation id. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + # Format: + # `projects/{project}/locations/{location}/conversations/{conversation}` + class GetConversationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for listing conversations based on parent. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListConversationsRequest. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. The max page size is 100. All larger page sizes will be coerced + # to 100. If unspecified, server will pick 50 as an approperiate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Returned conversations will match criteria specified within the + # filter. ListConversations allows filtering by: + # * agents + # * labels + class ListConversationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing conversations. + # @!attribute [rw] conversations + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>] + # The list of conversations. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListConversationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a conversation based on parent and conversation id. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + # Format: + # `projects/{project}/locations/{location}/conversations/{conversation}` + class DeleteConversationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb new file mode 100644 index 000000000000..7807be268656 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + # Represents different forms of credential specification. + # @!attribute [rw] oauth + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::OAuthCredentials] + # OAuth credentials. + class Credentials + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents OAuth credentials. + # @!attribute [rw] secret + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::OAuthCredentials::SecretBased] + # Secret-based OAuth credentials. + # + # Note: The following fields are mutually exclusive: `secret`, `token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] token + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::OAuthCredentials::TokenBased] + # Token-based OAuth credentials. + # + # Note: The following fields are mutually exclusive: `token`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class OAuthCredentials + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The name of the secret containing the access token. + # Represents secret-based OAuth credentials. + # @!attribute [rw] client_id + # @return [::String] + # Required. An OAuth client ID. + # @!attribute [rw] client_secret + # @return [::String] + # Required. An OAuth client secret. + class SecretBased + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Read more about Looker access tokens here: + # https://developers.looker.com/api/advanced-usage/looker-api-oauth + # @!attribute [rw] access_token + # @return [::String] + # Required. The name of the secret containing the access token. + class TokenBased + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb new file mode 100644 index 000000000000..464a1173a44c --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + # Message describing a DataAgent object. + # @!attribute [rw] data_analytics_agent + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAnalyticsAgent] + # Data analytics agent. + # @!attribute [rw] name + # @return [::String] + # Optional. Identifier. The unique resource name of a DataAgent. + # Format: + # `projects/{project}/locations/{location}/dataAgents/{data_agent_id}` + # `{data_agent}` is the resource id and should be 63 characters or less and + # must match the format described in + # https://google.aip.dev/122#resource-id-segments + # + # Example: `projects/1234567890/locations/global/dataAgents/my-agent`. + # + # It is recommended to skip setting this field during agent creation as it + # will be inferred automatically and overwritten with the + # \\{parent}/dataAgents/\\{data_agent_id}. + # @!attribute [rw] display_name + # @return [::String] + # Optional. User friendly display name. + # + # * Must be between 1-256 characters. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the agent. + # + # * Must be between 1-1024 characters. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels to help users filter related agents. + # For example, "sales", "business", "etl", and so on. + # Note labels are used only for filtering and not for policies. + # See the [labels + # documentation](https://cloud.google.com/resource-manager/docs/labels-overview) + # for more details on label usage. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the data agent was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the data agent was last updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. [Output only] The time the data agent was soft deleted. + # @!attribute [r] purge_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp in UTC of when this data agent is considered + # expired. This is *always* provided on output, regardless of what was sent + # on input. + class DataAgent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb new file mode 100644 index 000000000000..e2e7c89541d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb @@ -0,0 +1,267 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + # Message for requesting list of DataAgents. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListDataAgentsRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataAgents` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDataAgents` must + # match the call that provided the page token. The service may return fewer + # than this value. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + # syntax. + # @!attribute [rw] order_by + # @return [::String] + # Optional. User specification for how to order the results. + # @!attribute [rw] show_deleted + # @return [::Boolean] + # Optional. If true, the list results will include soft-deleted DataAgents. + # Defaults to false. + class ListDataAgentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing DataAgents. + # @!attribute [rw] data_agents + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] + # The list of DataAgent. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token or empty if none. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListDataAgentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of accessible DataAgents. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListAccessibleDataAgentsRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Server may return fewer items than requested. + # If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListAccessibleDataAgents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListAccessibleDataAgents` must match the call that provided the page + # token. The service may return fewer than this value. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + # syntax. + # @!attribute [rw] order_by + # @return [::String] + # Optional. User specification for how to order the results. + # @!attribute [rw] show_deleted + # @return [::Boolean] + # Optional. If true, the list results will include soft-deleted DataAgents. + # Defaults to false. + # @!attribute [rw] creator_filter + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest::CreatorFilter] + # Optional. Filter for the creator of the agent. + class ListAccessibleDataAgentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Filter for the creator of the agent. + module CreatorFilter + # Default value. + CREATOR_FILTER_UNSPECIFIED = 0 + + # No creator-specific filter will be applied. All agents will be returned. + NONE = 1 + + # Only agents created by the user calling the API will be returned. + CREATOR_ONLY = 2 + + # Only agents not created by the user calling the API will be returned. + NOT_CREATOR_ONLY = 3 + end + end + + # Message for response to listing accessible DataAgents. + # @!attribute [rw] data_agents + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] + # The list of accessible DataAgent. + # @!attribute [rw] next_page_token + # @return [::String] + # The next page token or empty if none. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListAccessibleDataAgentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a DataAgent. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetDataAgentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a DataAgent. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] data_agent_id + # @return [::String] + # Optional. Id of the requesting object. Must be unique within the parent. + # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # If not provided, the server will auto-generate a value for the id. + # @!attribute [rw] data_agent + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] + # Required. The resource being created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateDataAgentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a DataAgent. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # DataAgent resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields with non-default values + # present in the request will be overwritten. If a wildcard mask is provided, + # all fields will be overwritten. + # @!attribute [rw] data_agent + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] + # Required. The resource being updated. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateDataAgentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a DataAgent. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteDataAgentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have been cancelled successfully + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb new file mode 100644 index 000000000000..a57d8a3d9984 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + # Message describing a DataAnalyticsAgent object. + # @!attribute [rw] staging_context + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context] + # Optional. The staging context for the agent. + # This context is used to test and validate changes before publishing. + # @!attribute [rw] published_context + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context] + # Optional. The published context for the agent. + # This context is used by the Chat API in production. + # @!attribute [r] last_published_context + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context] + # Output only. The last published context for the agent. + # This is an output-only field populated by the system when the + # published context is updated. It is used to restore the agent to a + # previous state. + class DataAnalyticsAgent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb new file mode 100644 index 000000000000..175e661f19e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb @@ -0,0 +1,764 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + # Request to query data from a natural language query. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource to generate the query for. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] prompt + # @return [::String] + # Required. The natural language query for which to generate query. + # Example: "What are the top 5 best selling products this month?" + # @!attribute [rw] context + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataContext] + # Required. The context for the data query, including the data sources to + # use. + # @!attribute [rw] generation_options + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::GenerationOptions] + # Optional. Options to control query generation and execution behavior. + class QueryDataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options to control query generation, execution, and response format. + # @!attribute [rw] generate_query_result + # @return [::Boolean] + # Optional. If true, the generated query will be executed, and the result + # data will be returned in the response. + # @!attribute [rw] generate_natural_language_answer + # @return [::Boolean] + # Optional. If true, a natural language answer based on the query execution + # result will be generated and returned in the response. + # @!attribute [rw] generate_explanation + # @return [::Boolean] + # Optional. If true, an explanation of the generated query will be returned + # in the response. + # @!attribute [rw] generate_disambiguation_question + # @return [::Boolean] + # Optional. If true (default to false), the service may return a + # clarifying_question if the input query is ambiguous. + class GenerationOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # References to data sources and context to use for the query. + # @!attribute [rw] datasource_references + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DatasourceReferences] + # Required. The datasource references to use for the query. + class QueryDataContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response containing the generated query and related information. + # @!attribute [rw] generated_query + # @return [::String] + # Generated query for the given user prompt. + # @!attribute [rw] intent_explanation + # @return [::String] + # A natural language explanation of the generated query. + # Populated if options.generate_explanation was true in the request. + # @!attribute [rw] query_result + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ExecutedQueryResult] + # The result of executing the query. + # Populated if options.generate_query_result or + # options.generate_natural_language_answer was true in the request, and + # execution was successful or attempted. + # @!attribute [rw] natural_language_answer + # @return [::String] + # A natural language answer to the query, based on the query_result. + # Populated if options.generate_natural_language_answer was true in the + # request and query execution was successful based in the response from + # executeSql API. + # @!attribute [rw] disambiguation_question + # @return [::Array<::String>] + # If ambiguity was detected in the natural language query and + # options.generate_disambiguation_question was true, this field contains a + # question to the user for clarification. The returned represents the + # service's best effort based on the ambiguous input. + class QueryDataResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of a query execution. The design is generic for all dialects. + # @!attribute [rw] columns + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::ExecutedQueryResult::Column>] + # The columns in the result set, in order. + # @!attribute [rw] rows + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::ExecutedQueryResult::Row>] + # The rows returned by the query. + # @!attribute [rw] total_row_count + # @return [::Integer] + # The total number of rows in the full result set, if known. + # This may be an estimate or an exact count. + # @!attribute [rw] partial_result + # @return [::Boolean] + # Set to true if the returned rows in `query_result` are a subset of the + # full result. This can happen, for example, if the query execution hits a + # row limit. When true, the `query_result` does not contain all + # rows. To retrieve the complete result, consider using the + # `generated_query` in `QueryDataResponse` and executing it in your own + # environment. + # @!attribute [rw] query_execution_error + # @return [::String] + # The error message if the query execution failed. + class ExecutedQueryResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a single column in the result set. + # @!attribute [rw] name + # @return [::String] + # The name of the column. + # @!attribute [rw] type + # @return [::String] + # The type of the column (e.g., "VARCHAR", "INT64", "TIMESTAMP"). + class Column + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a single value within a row. + # @!attribute [rw] value + # @return [::String] + # The cell value, represented in a string format. + # Timestamps could be formatted, for example, using RFC3339Nano. + # This field is used if the value is not null. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a single row in the result set. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::ExecutedQueryResult::Value>] + # The values in the row, corresponding positionally to the columns. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request for listing chat messages based on parent and conversation_id. + # @!attribute [rw] parent + # @return [::String] + # Required. The conversation to list messages under. + # Format: + # `projects/{project}/locations/{location}/conversations/{conversation_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. The max page size is 100. All larger page sizes will be coerced + # to 100. If unspecified, server will pick 50 as an approperiate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for + # syntax. + # + # ListMessages allows filtering by: + # * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) + # * update_time + class ListMessagesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing chat messages. + # @!attribute [rw] messages + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>] + # The list of chat messages. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListMessagesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A stored message containing user message or system message. + # @!attribute [rw] message_id + # @return [::String] + # The unique resource name of a chat message. + # @!attribute [rw] message + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Message] + # The message content. + class StorageMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for Chat. + # @!attribute [rw] inline_context + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context] + # Optional. Inline context for the chat request. Use this to chat + # statelessly (without managed conversation persistence and without an + # Agent) by passing all context inline. + # + # Note: The following fields are mutually exclusive: `inline_context`, `conversation_reference`, `data_agent_context`, `client_managed_resource_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] conversation_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ConversationReference] + # Optional. Reference to a persisted conversation and agent context. + # Use this to chat with an Agent using managed conversation persistence. + # + # Note: The following fields are mutually exclusive: `conversation_reference`, `inline_context`, `data_agent_context`, `client_managed_resource_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data_agent_context + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext] + # Optional. Context for the chat request. Use this to chat with an Agent + # statelessly, without managed conversation persistence. + # + # Note: The following fields are mutually exclusive: `data_agent_context`, `inline_context`, `conversation_reference`, `client_managed_resource_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] client_managed_resource_context + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ClientManagedResourceContext] + # Optional. Context with client managed resources. + # Some clients may not use GDA managed resources including + # conversations and agents, instead they create and manage their own + # conversations and agents resources. + # + # Note: The following fields are mutually exclusive: `client_managed_resource_context`, `inline_context`, `conversation_reference`, `data_agent_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] project + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Optional. The Google Cloud project to be used for quota and billing. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent value for chat request. + # Pattern: `projects/{project}/locations/{location}` + # @!attribute [rw] messages + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Message>] + # Required. Content of current conversation. + class ChatRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Context for the chat request using a data agent. + # @!attribute [rw] data_agent + # @return [::String] + # Required. The name of the data agent resource. + # @!attribute [rw] credentials + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Credentials] + # Optional. The credentials to use when calling the Looker data source. + # + # Currently supports both OAuth token and API key-based credentials, as + # described in + # [Authentication with an + # SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk). + # @!attribute [rw] context_version + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext::ContextVersion] + # Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED) + class DataAgentContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # List of context versions supported by DCS. + # There are two versions of context. This is to maintain versioning for the + # data agent. + module ContextVersion + # Unspecified or unrecognized. + CONTEXT_VERSION_UNSPECIFIED = 0 + + # Using this version, DCS will use the latest staging context for the + # data agent. + STAGING = 1 + + # Using this version, DCS will use the latest published context for the + # data agent. + PUBLISHED = 2 + end + end + + # Reference to a persisted conversation and agent context. + # @!attribute [rw] conversation + # @return [::String] + # Required. Name of the conversation resource. + # Format: + # `projects/{project}/locations/{location}/conversations/{conversation_id}` + # @!attribute [rw] data_agent_context + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext] + # Required. Context for the chat request using a data agent. + class ConversationReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Context with client managed resources. + # Some clients may not use GDA managed resources including + # conversations and agents, instead they create and manage their own + # conversations and agents resources. + # @!attribute [rw] inline_context + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context] + # Required. Context for the chat request. Use this to chat without GDA API + # managed conversation and agent persistence by passing all context inline. + # @!attribute [rw] conversation_id + # @return [::String] + # Optional. The client managed conversation id. + # @!attribute [rw] agent_id + # @return [::String] + # Optional. The client managed agent id. + class ClientManagedResourceContext + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message from an interaction between the user and the system. + # @!attribute [rw] user_message + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::UserMessage] + # A message from the user that is interacting with the system. + # + # Note: The following fields are mutually exclusive: `user_message`, `system_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] system_message + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SystemMessage] + # A message from the system in response to the user. + # + # Note: The following fields are mutually exclusive: `system_message`, `user_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] timestamp + # @return [::Google::Protobuf::Timestamp] + # Output only. For user messages, this is the time at which the system + # received the message. For system messages, this is the time at which the + # system generated the message. + # @!attribute [rw] message_id + # @return [::String] + # Optional. unique id of the message in the conversation for persistence. + class Message + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message from the user that is interacting with the system. + # @!attribute [rw] text + # @return [::String] + # Text should use this field instead of blob. + class UserMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message from the system in response to the user. This message can also be a + # message from the user as historical context for multiturn conversations with + # the system. + # @!attribute [rw] text + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::TextMessage] + # A direct natural language response to the user message. + # + # Note: The following fields are mutually exclusive: `text`, `schema`, `data`, `analysis`, `chart`, `error`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] schema + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SchemaMessage] + # A message produced during schema resolution. + # + # Note: The following fields are mutually exclusive: `schema`, `text`, `data`, `analysis`, `chart`, `error`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] data + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataMessage] + # A message produced during data retrieval. + # + # Note: The following fields are mutually exclusive: `data`, `text`, `schema`, `analysis`, `chart`, `error`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] analysis + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AnalysisMessage] + # A message produced during analysis. + # + # Note: The following fields are mutually exclusive: `analysis`, `text`, `schema`, `data`, `chart`, `error`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] chart + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartMessage] + # A message produced during chart generation. + # + # Note: The following fields are mutually exclusive: `chart`, `text`, `schema`, `data`, `analysis`, `error`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] error + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ErrorMessage] + # An error message. + # + # Note: The following fields are mutually exclusive: `error`, `text`, `schema`, `data`, `analysis`, `chart`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] example_queries + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ExampleQueries] + # Optional. A message containing example queries. + # + # Note: The following fields are mutually exclusive: `example_queries`, `text`, `schema`, `data`, `analysis`, `chart`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] group_id + # @return [::Integer] + # Identifies the group that the event belongs to. Similar events are deemed + # to be logically relevant to each other and should be shown together in + # the UI. + class SystemMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A multi-part text message. + # @!attribute [rw] parts + # @return [::Array<::String>] + # Optional. The parts of the message. + # @!attribute [rw] text_type + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::TextMessage::TextType] + # Optional. The type of the text message. + class TextMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the text message. + module TextType + # The default text type. + TEXT_TYPE_UNSPECIFIED = 0 + + # The text is a final response to the user question. + FINAL_RESPONSE = 1 + + # The text is a thinking plan generated by the thinking tool. + THOUGHT = 2 + + # The text is an informational message about the agent's progress, such as + # a tool being invoked. This is distinct from the agent's internal thought + # process (`THOUGHT`) and the final answer to the user + # (`FINAL_RESPONSE`). These messages provide insight into the agent's + # actions. + PROGRESS = 3 + end + end + + # A message produced during schema resolution. + # @!attribute [rw] query + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SchemaQuery] + # A schema resolution query. + # + # Note: The following fields are mutually exclusive: `query`, `result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] result + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SchemaResult] + # The result of a schema resolution query. + # + # Note: The following fields are mutually exclusive: `result`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class SchemaMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A query for resolving the schema relevant to the posed question. + # @!attribute [rw] question + # @return [::String] + # Optional. The question to send to the system for schema resolution. + class SchemaQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of schema resolution. + # @!attribute [rw] datasources + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Datasource>] + # Optional. The datasources used to resolve the schema query. + class SchemaResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message produced during data retrieval. + # @!attribute [rw] query + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataQuery] + # A data retrieval query. + # + # Note: The following fields are mutually exclusive: `query`, `generated_sql`, `result`, `generated_looker_query`, `big_query_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] generated_sql + # @return [::String] + # SQL generated by the system to retrieve data. + # + # Note: The following fields are mutually exclusive: `generated_sql`, `query`, `result`, `generated_looker_query`, `big_query_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] result + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataResult] + # Retrieved data. + # + # Note: The following fields are mutually exclusive: `result`, `query`, `generated_sql`, `generated_looker_query`, `big_query_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] generated_looker_query + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery] + # Looker Query generated by the system to retrieve data. + # DEPRECATED: generated looker query is now under DataQuery.looker. + # + # Note: The following fields are mutually exclusive: `generated_looker_query`, `query`, `generated_sql`, `result`, `big_query_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] big_query_job + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::BigQueryJob] + # A BigQuery job executed by the system to retrieve data. + # + # Note: The following fields are mutually exclusive: `big_query_job`, `query`, `generated_sql`, `result`, `generated_looker_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A query for retrieving data. + # @!attribute [rw] looker + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery] + # Optional. A query for retrieving data from a Looker explore. + # @!attribute [rw] question + # @return [::String] + # Optional. A natural language question to answer. + # @!attribute [rw] name + # @return [::String] + # Optional. A snake-case name for the query that reflects its intent. It is + # used to name the corresponding data result, so that it can be referenced in + # later steps. + # + # * Example: "total_sales_by_product" + # * Example: "sales_for_product_12345" + # @!attribute [rw] datasources + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Datasource>] + # Optional. The datasources available to answer the question. + class DataQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Retrieved data. + # @!attribute [rw] name + # @return [::String] + # Optional. A snake-case name for the data result that reflects its contents. + # The name is used to pass the result around by reference, and serves as a + # signal about its meaning. + # + # * Example: "total_sales_by_product" + # * Example: "sales_for_product_12345" + # @!attribute [rw] schema + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Schema] + # Optional. The schema of the data. + # @!attribute [rw] data + # @return [::Array<::Google::Protobuf::Struct>] + # Optional. The content of the data. Each row is a struct that matches the + # schema. Simple values are represented as strings, while nested structures + # are represented as lists or structs. + class DataResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A BigQuery job executed by the system. + # @!attribute [rw] project_id + # @return [::String] + # Required. The project that the job belongs to. + # + # See + # [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + # @!attribute [rw] job_id + # @return [::String] + # Required. The ID of the job. + # + # See + # [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + # @!attribute [rw] location + # @return [::String] + # Optional. The location of the job. + # + # See + # [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). + # @!attribute [rw] destination_table + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::BigQueryTableReference] + # Optional. A reference to the destination table of the job's query results. + # + # See + # [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery). + # @!attribute [rw] schema + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Schema] + # Optional. The schema of the job's query results. + # + # See + # [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2). + class BigQueryJob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message produced during analysis. + # @!attribute [rw] query + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AnalysisQuery] + # An analysis query. + # + # Note: The following fields are mutually exclusive: `query`, `progress_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] progress_event + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AnalysisEvent] + # An event indicating the progress of the analysis. + # + # Note: The following fields are mutually exclusive: `progress_event`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AnalysisMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A query for performing an analysis. + # @!attribute [rw] question + # @return [::String] + # Optional. An analysis question to help answer the user's original question. + # @!attribute [rw] data_result_names + # @return [::Array<::String>] + # Optional. The names of previously retrieved data results to analyze. + class AnalysisQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An event indicating the progress of an analysis. + # @!attribute [rw] planner_reasoning + # @return [::String] + # Python codegen planner's reasoning. + # + # Note: The following fields are mutually exclusive: `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] coder_instruction + # @return [::String] + # Instructions issued for code generation. + # + # Note: The following fields are mutually exclusive: `coder_instruction`, `planner_reasoning`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] code + # @return [::String] + # Generated code. + # + # Note: The following fields are mutually exclusive: `code`, `planner_reasoning`, `coder_instruction`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] execution_output + # @return [::String] + # Output from code execution. + # + # Note: The following fields are mutually exclusive: `execution_output`, `planner_reasoning`, `coder_instruction`, `code`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] execution_error + # @return [::String] + # An error from code execution. + # + # Note: The following fields are mutually exclusive: `execution_error`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] result_vega_chart_json + # @return [::String] + # Result as Vega chart JSON string. + # + # Note: The following fields are mutually exclusive: `result_vega_chart_json`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] result_natural_language + # @return [::String] + # Result as NL string. + # + # Note: The following fields are mutually exclusive: `result_natural_language`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] result_csv_data + # @return [::String] + # Result as CSV string. + # + # Note: The following fields are mutually exclusive: `result_csv_data`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] result_reference_data + # @return [::String] + # Result as a reference to a data source. + # + # Note: The following fields are mutually exclusive: `result_reference_data`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] error + # @return [::String] + # A generic error message. + # + # Note: The following fields are mutually exclusive: `error`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AnalysisEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message produced during chart generation. + # @!attribute [rw] query + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartQuery] + # A query for generating a chart. + # + # Note: The following fields are mutually exclusive: `query`, `result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] result + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartResult] + # The result of a chart generation query. + # + # Note: The following fields are mutually exclusive: `result`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ChartMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A query for generating a chart. + # @!attribute [rw] instructions + # @return [::String] + # Optional. Natural language instructions for generating the chart. + # @!attribute [rw] data_result_name + # @return [::String] + # Optional. The name of a previously retrieved data result to use in the + # chart. + class ChartQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The result of a chart generation query. + # @!attribute [rw] vega_config + # @return [::Google::Protobuf::Struct] + # Optional. A generated Vega chart config. + # See https://vega.github.io/vega/docs/config/ + # @!attribute [rw] image + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Blob] + # Optional. A rendering of the chart if this was requested in the context. + class ChartResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An error message from a tool call. + # This message is used to represent an error that occurred while an agent was + # trying to use a tool. It's important to note that not all errors are + # terminal. Many are recoverable, and the agent may use the information from + # this error message to self-correct and retry the tool call or try a + # different approach. + # + # For example, if a data query fails, the agent might receive an + # `ErrorMessage`, analyze it, and then generate a corrected query. + # + # Clients should be cautious about interpreting this message as a definitive + # failure. It can be part of the agent's normal, iterative process of + # completing a task. Surfacing these errors directly to end-users without + # context (e.g., as a "hard failure") may be misleading. + # @!attribute [r] text + # @return [::String] + # Output only. The text of the error. + class ErrorMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message containing derived and authored example queries. + # @!attribute [rw] example_queries + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::ExampleQuery>] + # Optional. A list of derived and authored example queries, providing + # examples of relevant and commonly used SQL queries and their corresponding + # natural language queries optionally present. Currently only used for + # BigQuery data sources. + class ExampleQueries + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A blob of data with a MIME type. + # @!attribute [rw] mime_type + # @return [::String] + # Required. The IANA standard MIME type of the message data. + # @!attribute [rw] data + # @return [::String] + # Required. The data represented as bytes. + class Blob + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb new file mode 100644 index 000000000000..96575cdbf6ec --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb @@ -0,0 +1,465 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics + module V1beta + # A collection of references to datasources. + # @!attribute [rw] bq + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::BigQueryTableReferences] + # References to BigQuery tables. + # + # Note: The following fields are mutually exclusive: `bq`, `studio`, `looker`, `alloydb`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] studio + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::StudioDatasourceReferences] + # References to Looker Studio datasources. + # + # Note: The following fields are mutually exclusive: `studio`, `bq`, `looker`, `alloydb`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] looker + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerExploreReferences] + # References to Looker Explores. + # + # Note: The following fields are mutually exclusive: `looker`, `bq`, `studio`, `alloydb`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] alloydb + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AlloyDbReference] + # Reference to an AlloyDB database. Only supported for the `QueryData` + # method. + # + # Note: The following fields are mutually exclusive: `alloydb`, `bq`, `studio`, `looker`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] spanner_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SpannerReference] + # Reference to a Spanner database. Only supported for the `QueryData` + # method. + # + # Note: The following fields are mutually exclusive: `spanner_reference`, `bq`, `studio`, `looker`, `alloydb`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_sql_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::CloudSqlReference] + # Reference to a CloudSql database. Only supported for the `QueryData` + # method. + # + # Note: The following fields are mutually exclusive: `cloud_sql_reference`, `bq`, `studio`, `looker`, `alloydb`, `spanner_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DatasourceReferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing references to BigQuery tables and property graphs. + # At least one of `table_references` or `property_graph_references` must be + # populated. + # @!attribute [rw] table_references + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::BigQueryTableReference>] + # Optional. References to BigQuery tables. + class BigQueryTableReferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing a reference to a single BigQuery table. + # @!attribute [rw] project_id + # @return [::String] + # Required. The project that the table belongs to. + # @!attribute [rw] dataset_id + # @return [::String] + # Required. The dataset that the table belongs to. + # @!attribute [rw] table_id + # @return [::String] + # Required. The table id. + # @!attribute [rw] schema + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Schema] + # Optional. The schema of the datasource. + class BigQueryTableReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing references to Looker Studio datasources. + # @!attribute [rw] studio_references + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::StudioDatasourceReference>] + # The references to the studio datasources. + class StudioDatasourceReferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing a reference to a single Looker Studio datasource. + # @!attribute [rw] datasource_id + # @return [::String] + # Required. The id of the datasource. + class StudioDatasourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing reference to an AlloyDB database and agent context. + # Only supported for the `QueryData` method. + # @!attribute [rw] database_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AlloyDbDatabaseReference] + # Required. Singular proto that supports specifying which database and tables + # to include. + # @!attribute [rw] agent_context_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AgentContextReference] + # Optional. Parameters for retrieving data from Agent Context. + class AlloyDbReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing a reference to a single AlloyDB database. + # @!attribute [rw] project_id + # @return [::String] + # Required. The project the instance belongs to. + # @!attribute [rw] region + # @return [::String] + # Required. The region of the instance. + # @!attribute [rw] cluster_id + # @return [::String] + # Required. The cluster id. + # @!attribute [rw] instance_id + # @return [::String] + # Required. The instance id. + # @!attribute [rw] database_id + # @return [::String] + # Required. The database id. + # @!attribute [rw] table_ids + # @return [::Array<::String>] + # Optional. The table ids. Denotes all tables if unset. + class AlloyDbDatabaseReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing reference to a Spanner database and agent context. + # Only supported for the `QueryData` method. + # @!attribute [rw] database_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SpannerDatabaseReference] + # Required. Singular proto that supports specifying which database and tables + # to include. + # @!attribute [rw] agent_context_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AgentContextReference] + # Optional. Parameters for retrieving data from Agent Context. + class SpannerReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing a reference to a single Spanner database. + # @!attribute [rw] engine + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SpannerDatabaseReference::Engine] + # Required. The engine of the Spanner instance. + # @!attribute [rw] project_id + # @return [::String] + # Required. The project the instance belongs to. + # @!attribute [rw] region + # @return [::String] + # Required. The region of the instance. + # @!attribute [rw] instance_id + # @return [::String] + # Required. The instance id. + # @!attribute [rw] database_id + # @return [::String] + # Required. The database id. + # @!attribute [rw] table_ids + # @return [::Array<::String>] + # Optional. The table ids. Denotes all tables if unset. + class SpannerDatabaseReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The database engine. + module Engine + # Engine is not specified. + ENGINE_UNSPECIFIED = 0 + + # Google SQL + GOOGLE_SQL = 1 + + # PostgreSQL + POSTGRESQL = 2 + end + end + + # Message representing reference to a CloudSQL database and agent context. + # Only supported for the `QueryData` method. + # @!attribute [rw] database_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::CloudSqlDatabaseReference] + # Required. Singular proto that supports specifying which database and tables + # to include. + # @!attribute [rw] agent_context_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AgentContextReference] + # Optional. Parameters for retrieving data from Agent Context. + class CloudSqlReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing a reference to a single CloudSQL database. + # @!attribute [rw] engine + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::CloudSqlDatabaseReference::Engine] + # Required. The engine of the Cloud SQL instance. + # @!attribute [rw] project_id + # @return [::String] + # Required. The project the instance belongs to. + # @!attribute [rw] region + # @return [::String] + # Required. The region of the instance. + # @!attribute [rw] instance_id + # @return [::String] + # Required. The instance id. + # @!attribute [rw] database_id + # @return [::String] + # Required. The database id. + # @!attribute [rw] table_ids + # @return [::Array<::String>] + # Optional. The table ids. Denotes all tables if unset. + class CloudSqlDatabaseReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The database engine. + module Engine + # Engine is not specified. + ENGINE_UNSPECIFIED = 0 + + # PostgreSQL + POSTGRESQL = 1 + + # MySQL + MYSQL = 2 + end + end + + # Message representing references to Looker explores. + # @!attribute [rw] explore_references + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::LookerExploreReference>] + # Required. References to Looker explores. + # @!attribute [rw] credentials + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Credentials] + # Optional. The credentials to use when calling the Looker API. + # + # Currently supports both OAuth token and API key-based credentials, as + # described in + # [Authentication with an + # SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk). + class LookerExploreReferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing a reference to a single Looker explore. + # @!attribute [rw] looker_instance_uri + # @return [::String] + # Required. The base url of the Looker instance. + # + # Note: The following fields are mutually exclusive: `looker_instance_uri`, `private_looker_instance_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] private_looker_instance_info + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::PrivateLookerInstanceInfo] + # Private Looker instance info. + # + # Note: The following fields are mutually exclusive: `private_looker_instance_info`, `looker_instance_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] lookml_model + # @return [::String] + # Required. Looker model, as outlined in + # [Major LookML + # structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures). + # Name of the LookML model. + # @!attribute [rw] explore + # @return [::String] + # Required. Looker Explore, as outlined in + # [Major LookML + # structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures). + # Name of the LookML Explore. + # @!attribute [rw] schema + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Schema] + # Optional. The schema of the datasource. + class LookerExploreReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message representing a private Looker instance info required if the Looker + # instance is behind a private network. + # @!attribute [rw] looker_instance_id + # @return [::String] + # The Looker instance id. + # @!attribute [rw] service_directory_name + # @return [::String] + # The service directory name of the Looker instance. + class PrivateLookerInstanceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A datasource that can be used to answer questions. + # @!attribute [rw] bigquery_table_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::BigQueryTableReference] + # A reference to a BigQuery table. + # + # Note: The following fields are mutually exclusive: `bigquery_table_reference`, `studio_datasource_id`, `looker_explore_reference`, `alloy_db_reference`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] studio_datasource_id + # @return [::String] + # A reference to a Looker Studio datasource. + # + # Note: The following fields are mutually exclusive: `studio_datasource_id`, `bigquery_table_reference`, `looker_explore_reference`, `alloy_db_reference`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] looker_explore_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerExploreReference] + # A reference to a Looker explore. + # + # Note: The following fields are mutually exclusive: `looker_explore_reference`, `bigquery_table_reference`, `studio_datasource_id`, `alloy_db_reference`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] alloy_db_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AlloyDbReference] + # A reference to an AlloyDB database. + # + # Note: The following fields are mutually exclusive: `alloy_db_reference`, `bigquery_table_reference`, `studio_datasource_id`, `looker_explore_reference`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] spanner_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SpannerReference] + # A reference to a Spanner database. + # + # Note: The following fields are mutually exclusive: `spanner_reference`, `bigquery_table_reference`, `studio_datasource_id`, `looker_explore_reference`, `alloy_db_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_sql_reference + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::CloudSqlReference] + # A reference to a CloudSQL database. + # + # Note: The following fields are mutually exclusive: `cloud_sql_reference`, `bigquery_table_reference`, `studio_datasource_id`, `looker_explore_reference`, `alloy_db_reference`, `spanner_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] schema + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Schema] + # Optional. The schema of the datasource. + # @!attribute [rw] struct_schema + # @return [::Google::Protobuf::Struct] + # Optional. A struct representation of the schema. + # This is populated for datasources with schemas that cannot be + # fully represented by the strongly-typed `schema` field. + # + # For Looker datasources, this maps to the LookmlModelExplore type: + # https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore + class Datasource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The schema of a Datasource or QueryResult instance. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Field>] + # Optional. The fields in the schema. + # @!attribute [rw] description + # @return [::String] + # Optional. A textual description of the table's content and purpose. + # For example: "Contains information about customer orders in our e-commerce + # store." Currently only used for BigQuery data sources. + # @!attribute [rw] synonyms + # @return [::Array<::String>] + # Optional. A list of alternative names or synonyms that can be used to refer + # to the table. For example: ["sales", "orders", "purchases"]. Currently only + # used for BigQuery data sources. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Optional. A list of tags or keywords associated with the table, used for + # categorization. For example: ["transaction", "revenue", "customer_data"]. + # Currently only used for BigQuery data sources. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Table display_name (same as label in + # cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not + # required, currently only Looker has this field. + # @!attribute [rw] filters + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::DataFilter>] + # Optional. The filters on the datasource's underlying data. Currently only + # used for Looker data sources. + class Schema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A field in a schema. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of the field. + # @!attribute [rw] type + # @return [::String] + # Optional. The type of the field. + # @!attribute [rw] description + # @return [::String] + # Optional. A brief description of the field. + # @!attribute [rw] mode + # @return [::String] + # Optional. The mode of the field (e.g., NULLABLE, REPEATED). + # @!attribute [rw] synonyms + # @return [::Array<::String>] + # Optional. A list of alternative names or synonyms that can be used to refer + # to this field. For example: ["id", "customerid", "cust_id"]. Currently only + # used for BigQuery data sources. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Optional. A list of tags or keywords associated with the field, used for + # categorization. For example: ["identifier", "customer", "pii"]. Currently + # only used for BigQuery data sources. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Field display_name (same as label in + # @!attribute [rw] subfields + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Field>] + # Optional. Recursive property for nested schema structures. + # @!attribute [rw] category + # @return [::String] + # Optional. Field category, not required, currently only useful for Looker. + # We are using a string to avoid depending on an external package and keep + # this package self-contained. + # @!attribute [rw] value_format + # @return [::String] + # Optional. Looker only. Value format of the field. + # Ref: + # https://cloud.google.com/looker/docs/reference/param-field-value-format + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A filter on a datasource's underlying data. Filter syntax documentation: + # https://cloud.google.com/looker/docs/filter-expressions + # @!attribute [rw] field + # @return [::String] + # Optional. The field to filter on. For example: ["event_date", + # "customer_id", "product_category"] + # @!attribute [rw] value + # @return [::String] + # Optional. The default value used for this filter if the filter is not + # overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"] + # @!attribute [rw] type + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataFilterType] + # Optional. The type of filter present on a datasource, such as + # ALWAYS_FILTER. + class DataFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of filter present on a datasource, such as ALWAYS_FILTER. + module DataFilterType + # The filter type was not specified. + DATA_FILTER_TYPE_UNSPECIFIED = 0 + + # A filter that the user configures, and any queries to the Explore will + # always apply this filter by default. Currently only used for Looker data + # sources. + ALWAYS_FILTER = 1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..fbee4c39d435 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..848f8c2f7895 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..79fdbd1e2eff --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..f2d9d79d9da4 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..9e9bdbb09ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..341efa296c29 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..c2acab1235a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..ad3c3ad25f0f --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..b8b33e5c8cec --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..a005f395ccab --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..54bd4318d321 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..3f61f95b2587 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..9505eeb8657e --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..35c4eece9108 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta", path: "../" +else + gem "google-cloud-gemini_data_analytics-v1beta" +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-gemini_data_analytics-v1beta/snippets/data_agent_service/create_data_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/create_data_agent.rb new file mode 100644 index 000000000000..de0cc501f6dd --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/create_data_agent.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the create_data_agent call in the DataAgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#create_data_agent. +# +def create_data_agent + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new + + # Call the create_data_agent method. + result = client.create_data_agent 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 geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/delete_data_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/delete_data_agent.rb new file mode 100644 index 000000000000..6dac918c76e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/delete_data_agent.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the delete_data_agent call in the DataAgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#delete_data_agent. +# +def delete_data_agent + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new + + # Call the delete_data_agent method. + result = client.delete_data_agent 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 geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_data_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_data_agent.rb new file mode 100644 index 000000000000..579f75a66312 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_data_agent.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataAgentService_GetDataAgent_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the get_data_agent call in the DataAgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_data_agent. +# +def get_data_agent + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.new + + # Call the get_data_agent method. + result = client.get_data_agent request + + # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent. + p result +end +# [END geminidataanalytics_v1beta_generated_DataAgentService_GetDataAgent_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_iam_policy.rb new file mode 100644 index 000000000000..f9f9e44332f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataAgentService_GetIamPolicy_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the get_iam_policy call in the DataAgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END geminidataanalytics_v1beta_generated_DataAgentService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_accessible_data_agents.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_accessible_data_agents.rb new file mode 100644 index 000000000000..37741baa1572 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_accessible_data_agents.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataAgentService_ListAccessibleDataAgents_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the list_accessible_data_agents call in the DataAgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_accessible_data_agents. +# +def list_accessible_data_agents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new + + # Call the list_accessible_data_agents method. + result = client.list_accessible_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. + p item + end +end +# [END geminidataanalytics_v1beta_generated_DataAgentService_ListAccessibleDataAgents_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_data_agents.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_data_agents.rb new file mode 100644 index 000000000000..cb339d6a8922 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_data_agents.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataAgentService_ListDataAgents_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the list_data_agents call in the DataAgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_data_agents. +# +def list_data_agents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new + + # Call the list_data_agents method. + result = client.list_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. + p item + end +end +# [END geminidataanalytics_v1beta_generated_DataAgentService_ListDataAgents_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/set_iam_policy.rb new file mode 100644 index 000000000000..e4aaec98f242 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataAgentService_SetIamPolicy_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the set_iam_policy call in the DataAgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END geminidataanalytics_v1beta_generated_DataAgentService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/update_data_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/update_data_agent.rb new file mode 100644 index 000000000000..33e824f2bacb --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/update_data_agent.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the update_data_agent call in the DataAgentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#update_data_agent. +# +def update_data_agent + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new + + # Call the update_data_agent method. + result = client.update_data_agent 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 geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/chat.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/chat.rb new file mode 100644 index 000000000000..e864587ed997 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/chat.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataChatService_Chat_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the chat call in the DataChatService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#chat. +# +def chat + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new + + # Call the chat method to start streaming. + output = client.chat request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::GeminiDataAnalytics::V1beta::Message + output.each do |current_response| + p current_response + end +end +# [END geminidataanalytics_v1beta_generated_DataChatService_Chat_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/create_conversation.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/create_conversation.rb new file mode 100644 index 000000000000..0d5551701b65 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/create_conversation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataChatService_CreateConversation_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the create_conversation call in the DataChatService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#create_conversation. +# +def create_conversation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new + + # Call the create_conversation method. + result = client.create_conversation request + + # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. + p result +end +# [END geminidataanalytics_v1beta_generated_DataChatService_CreateConversation_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/delete_conversation.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/delete_conversation.rb new file mode 100644 index 000000000000..41cd8a554cb5 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/delete_conversation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataChatService_DeleteConversation_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the delete_conversation call in the DataChatService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#delete_conversation. +# +def delete_conversation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new + + # Call the delete_conversation method. + result = client.delete_conversation request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END geminidataanalytics_v1beta_generated_DataChatService_DeleteConversation_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/get_conversation.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/get_conversation.rb new file mode 100644 index 000000000000..bbe91f289e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/get_conversation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataChatService_GetConversation_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the get_conversation call in the DataChatService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#get_conversation. +# +def get_conversation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new + + # Call the get_conversation method. + result = client.get_conversation request + + # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. + p result +end +# [END geminidataanalytics_v1beta_generated_DataChatService_GetConversation_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_conversations.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_conversations.rb new file mode 100644 index 000000000000..adbec4557800 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_conversations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataChatService_ListConversations_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the list_conversations call in the DataChatService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_conversations. +# +def list_conversations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.new + + # Call the list_conversations method. + result = client.list_conversations 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::GeminiDataAnalytics::V1beta::Conversation. + p item + end +end +# [END geminidataanalytics_v1beta_generated_DataChatService_ListConversations_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_messages.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_messages.rb new file mode 100644 index 000000000000..54d9d15f12ae --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_messages.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataChatService_ListMessages_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the list_messages call in the DataChatService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_messages. +# +def list_messages + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.new + + # Call the list_messages method. + result = client.list_messages 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::GeminiDataAnalytics::V1beta::StorageMessage. + p item + end +end +# [END geminidataanalytics_v1beta_generated_DataChatService_ListMessages_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/query_data.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/query_data.rb new file mode 100644 index 000000000000..0dc1f4290712 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/query_data.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START geminidataanalytics_v1beta_generated_DataChatService_QueryData_sync] +require "google/cloud/gemini_data_analytics/v1beta" + +## +# Snippet for the query_data call in the DataChatService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#query_data. +# +def query_data + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new + + # Call the query_data method. + result = client.query_data request + + # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse. + p result +end +# [END geminidataanalytics_v1beta_generated_DataChatService_QueryData_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json new file mode 100644 index 000000000000..55fa2418f776 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json @@ -0,0 +1,615 @@ +{ + "client_library": { + "name": "google-cloud-gemini_data_analytics-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.geminidataanalytics.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_ListDataAgents_sync", + "title": "Snippet for the list_data_agents call in the DataAgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_data_agents.", + "file": "data_agent_service/list_data_agents.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_agents", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_data_agents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse", + "client": { + "short_name": "DataAgentService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" + }, + "method": { + "short_name": "ListDataAgents", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.ListDataAgents", + "service": { + "short_name": "DataAgentService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_ListAccessibleDataAgents_sync", + "title": "Snippet for the list_accessible_data_agents call in the DataAgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_accessible_data_agents.", + "file": "data_agent_service/list_accessible_data_agents.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_accessible_data_agents", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_accessible_data_agents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse", + "client": { + "short_name": "DataAgentService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" + }, + "method": { + "short_name": "ListAccessibleDataAgents", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.ListAccessibleDataAgents", + "service": { + "short_name": "DataAgentService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_GetDataAgent_sync", + "title": "Snippet for the get_data_agent call in the DataAgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_data_agent.", + "file": "data_agent_service/get_data_agent.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_agent", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_data_agent", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent", + "client": { + "short_name": "DataAgentService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" + }, + "method": { + "short_name": "GetDataAgent", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.GetDataAgent", + "service": { + "short_name": "DataAgentService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_sync", + "title": "Snippet for the create_data_agent call in the DataAgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#create_data_agent.", + "file": "data_agent_service/create_data_agent.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_agent", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#create_data_agent", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataAgentService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" + }, + "method": { + "short_name": "CreateDataAgent", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.CreateDataAgent", + "service": { + "short_name": "DataAgentService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_sync", + "title": "Snippet for the update_data_agent call in the DataAgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#update_data_agent.", + "file": "data_agent_service/update_data_agent.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_agent", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#update_data_agent", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataAgentService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" + }, + "method": { + "short_name": "UpdateDataAgent", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.UpdateDataAgent", + "service": { + "short_name": "DataAgentService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_sync", + "title": "Snippet for the delete_data_agent call in the DataAgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#delete_data_agent.", + "file": "data_agent_service/delete_data_agent.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_agent", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#delete_data_agent", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "DataAgentService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" + }, + "method": { + "short_name": "DeleteDataAgent", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.DeleteDataAgent", + "service": { + "short_name": "DataAgentService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the DataAgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_iam_policy.", + "file": "data_agent_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "DataAgentService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.GetIamPolicy", + "service": { + "short_name": "DataAgentService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the DataAgentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#set_iam_policy.", + "file": "data_agent_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "DataAgentService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.SetIamPolicy", + "service": { + "short_name": "DataAgentService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_Chat_sync", + "title": "Snippet for the chat call in the DataChatService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#chat.", + "file": "data_chat_service/chat.rb", + "language": "RUBY", + "client_method": { + "short_name": "chat", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#chat", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::Message", + "client": { + "short_name": "DataChatService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" + }, + "method": { + "short_name": "Chat", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.Chat", + "service": { + "short_name": "DataChatService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_CreateConversation_sync", + "title": "Snippet for the create_conversation call in the DataChatService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#create_conversation.", + "file": "data_chat_service/create_conversation.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_conversation", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#create_conversation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation", + "client": { + "short_name": "DataChatService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" + }, + "method": { + "short_name": "CreateConversation", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.CreateConversation", + "service": { + "short_name": "DataChatService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_DeleteConversation_sync", + "title": "Snippet for the delete_conversation call in the DataChatService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#delete_conversation.", + "file": "data_chat_service/delete_conversation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_conversation", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#delete_conversation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataChatService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" + }, + "method": { + "short_name": "DeleteConversation", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.DeleteConversation", + "service": { + "short_name": "DataChatService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_GetConversation_sync", + "title": "Snippet for the get_conversation call in the DataChatService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#get_conversation.", + "file": "data_chat_service/get_conversation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_conversation", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#get_conversation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation", + "client": { + "short_name": "DataChatService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" + }, + "method": { + "short_name": "GetConversation", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.GetConversation", + "service": { + "short_name": "DataChatService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_ListConversations_sync", + "title": "Snippet for the list_conversations call in the DataChatService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_conversations.", + "file": "data_chat_service/list_conversations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_conversations", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_conversations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse", + "client": { + "short_name": "DataChatService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" + }, + "method": { + "short_name": "ListConversations", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.ListConversations", + "service": { + "short_name": "DataChatService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_ListMessages_sync", + "title": "Snippet for the list_messages call in the DataChatService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_messages.", + "file": "data_chat_service/list_messages.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_messages", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_messages", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse", + "client": { + "short_name": "DataChatService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" + }, + "method": { + "short_name": "ListMessages", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.ListMessages", + "service": { + "short_name": "DataChatService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_QueryData_sync", + "title": "Snippet for the query_data call in the DataChatService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#query_data.", + "file": "data_chat_service/query_data.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_data", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#query_data", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse", + "client": { + "short_name": "DataChatService::Client", + "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" + }, + "method": { + "short_name": "QueryData", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.QueryData", + "service": { + "short_name": "DataChatService", + "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" + } + } + }, + "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-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_operations_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_operations_test.rb new file mode 100644 index 000000000000..fafc082205b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_agent_service_pb" +require "google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service" + +class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_paths_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_paths_test.rb new file mode 100644 index 000000000000..c03aa78ff4cd --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gemini_data_analytics/v1beta/data_agent_service" + +class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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_agent_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_agent_path project: "value0", location: "value1", data_agent: "value2" + assert_equal "projects/value0/locations/value1/dataAgents/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_rest_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_rest_test.rb new file mode 100644 index 000000000000..cec5c192d53b --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_rest_test.rb @@ -0,0 +1,551 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_agent_service_pb" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest" + + +class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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_list_data_agents + # Create test objects. + client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse.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" + order_by = "hello world" + show_deleted = true + + list_data_agents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_list_data_agents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_agents_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_agents ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_agents(::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_agents_client_stub.call_count + end + end + end + + def test_list_accessible_data_agents + # Create test objects. + client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse.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" + order_by = "hello world" + show_deleted = true + creator_filter = :CREATOR_FILTER_UNSPECIFIED + + list_accessible_data_agents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_list_accessible_data_agents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_accessible_data_agents_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_accessible_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_accessible_data_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_accessible_data_agents ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_accessible_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_accessible_data_agents(::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_accessible_data_agents_client_stub.call_count + end + end + end + + def test_get_data_agent + # Create test objects. + client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_agent_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_get_data_agent_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_agent_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_agent({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_agent name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_agent({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_agent_client_stub.call_count + end + end + end + + def test_create_data_agent + # 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" + data_agent_id = "hello world" + data_agent = {} + request_id = "hello world" + + create_data_agent_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_create_data_agent_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_agent_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_agent({ parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_agent parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new(parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_agent({ parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new(parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_agent_client_stub.call_count + end + end + end + + def test_update_data_agent + # 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. + update_mask = {} + data_agent = {} + request_id = "hello world" + + update_data_agent_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_update_data_agent_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_agent_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_agent({ update_mask: update_mask, data_agent: data_agent, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_agent update_mask: update_mask, data_agent: data_agent, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new(update_mask: update_mask, data_agent: data_agent, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_agent({ update_mask: update_mask, data_agent: data_agent, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new(update_mask: update_mask, data_agent: data_agent, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_agent_client_stub.call_count + end + end + end + + def test_delete_data_agent + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_data_agent_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_delete_data_agent_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_agent_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_agent({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_agent name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_agent({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_agent_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_test.rb new file mode 100644 index 000000000000..372c63984b2a --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_test.rb @@ -0,0 +1,647 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_agent_service_pb" +require "google/cloud/gemini_data_analytics/v1beta/data_agent_service" + +class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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_list_data_agents + # Create GRPC objects. + grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + order_by = "hello world" + show_deleted = true + + list_data_agents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_agents, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest, 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"] + assert_equal "hello world", request["order_by"] + assert_equal true, request["show_deleted"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_agents_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted }) 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_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted 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_agents ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted) 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_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted }, 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_agents(::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted), 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_agents_client_stub.call_rpc_count + end + end + + def test_list_accessible_data_agents + # Create GRPC objects. + grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + order_by = "hello world" + show_deleted = true + creator_filter = :CREATOR_FILTER_UNSPECIFIED + + list_accessible_data_agents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_accessible_data_agents, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest, 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"] + assert_equal "hello world", request["order_by"] + assert_equal true, request["show_deleted"] + assert_equal :CREATOR_FILTER_UNSPECIFIED, request["creator_filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_accessible_data_agents_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_accessible_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_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_accessible_data_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_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_accessible_data_agents ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_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_accessible_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_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_accessible_data_agents(::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_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_accessible_data_agents_client_stub.call_rpc_count + end + end + + def test_get_data_agent + # Create GRPC objects. + grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent.new + grpc_operation = GRPC::ActiveCall::Operation.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_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_agent, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_agent_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_agent({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_agent name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.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_agent({ 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_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.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_agent_client_stub.call_rpc_count + end + end + + def test_create_data_agent + # 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" + data_agent_id = "hello world" + data_agent = {} + request_id = "hello world" + + create_data_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_agent, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_agent_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent), request["data_agent"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_agent_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_agent({ parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id }) 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_data_agent parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id 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_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new(parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id) 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_data_agent({ parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id }, 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_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new(parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id), 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_data_agent_client_stub.call_rpc_count + end + end + + def test_update_data_agent + # 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. + update_mask = {} + data_agent = {} + request_id = "hello world" + + update_data_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_agent, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent), request["data_agent"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_agent_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_agent({ update_mask: update_mask, data_agent: data_agent, request_id: request_id }) 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.update_data_agent update_mask: update_mask, data_agent: data_agent, request_id: request_id 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.update_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new(update_mask: update_mask, data_agent: data_agent, request_id: request_id) 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.update_data_agent({ update_mask: update_mask, data_agent: data_agent, request_id: request_id }, 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.update_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new(update_mask: update_mask, data_agent: data_agent, request_id: request_id), 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, update_data_agent_client_stub.call_rpc_count + end + end + + def test_delete_data_agent + # 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" + request_id = "hello world" + + delete_data_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_agent, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_agent_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_agent({ name: name, request_id: request_id }) 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.delete_data_agent name: name, request_id: request_id 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.delete_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new(name: name, request_id: request_id) 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.delete_data_agent({ name: name, request_id: request_id }, 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.delete_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_agent_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, 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.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, 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, set_iam_policy_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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_paths_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_paths_test.rb new file mode 100644 index 000000000000..f47f7fb34ff5 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gemini_data_analytics/v1beta/data_chat_service" + +class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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_conversation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.conversation_path project: "value0", location: "value1", conversation: "value2" + assert_equal "projects/value0/locations/value1/conversations/value2", path + end + end + + def test_data_agent_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_agent_path project: "value0", location: "value1", data_agent: "value2" + assert_equal "projects/value0/locations/value1/dataAgents/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_rest_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_rest_test.rb new file mode 100644 index 000000000000..85ff993c3efc --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_rest_test.rb @@ -0,0 +1,492 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_chat_service_pb" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest" + + +class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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_chat + # Create test objects. + client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Message.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + inline_context = {} + project = "hello world" + parent = "hello world" + messages = [{}] + + chat_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_chat_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, chat_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.chat({ inline_context: inline_context, project: project, parent: parent, messages: messages }) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use named arguments + client.chat inline_context: inline_context, project: project, parent: parent, messages: messages do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object + client.chat ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new(inline_context: inline_context, project: project, parent: parent, messages: messages) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use hash object with options + client.chat({ inline_context: inline_context, project: project, parent: parent, messages: messages }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object with options + client.chat(::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new(inline_context: inline_context, project: project, parent: parent, messages: messages), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Verify method calls + assert_equal 5, chat_client_stub.call_count + end + end + end + + def test_create_conversation + # Create test objects. + client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + conversation_id = "hello world" + conversation = {} + request_id = "hello world" + + create_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_create_conversation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_conversation_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_conversation({ parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_conversation parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new(parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_conversation({ parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new(parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_conversation_client_stub.call_count + end + end + end + + def test_delete_conversation + # 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_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_delete_conversation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_conversation_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_conversation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_conversation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_conversation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_conversation_client_stub.call_count + end + end + end + + def test_get_conversation + # Create test objects. + client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_get_conversation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_conversation_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_conversation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_conversation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_conversation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_conversation_client_stub.call_count + end + end + end + + def test_list_conversations + # Create test objects. + client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse.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_conversations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_list_conversations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_conversations_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_conversations({ 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_conversations 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_conversations ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.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_conversations({ 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_conversations(::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.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_conversations_client_stub.call_count + end + end + end + + def test_list_messages + # Create test objects. + client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse.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_messages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_list_messages_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_messages_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_messages({ 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_messages 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_messages ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.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_messages({ 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_messages(::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.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_messages_client_stub.call_count + end + end + end + + def test_query_data + # Create test objects. + client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + prompt = "hello world" + context = {} + generation_options = {} + + query_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_query_data_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_data_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_data({ parent: parent, prompt: prompt, context: context, generation_options: generation_options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.query_data parent: parent, prompt: prompt, context: context, generation_options: generation_options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.query_data ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new(parent: parent, prompt: prompt, context: context, generation_options: generation_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.query_data({ parent: parent, prompt: prompt, context: context, generation_options: generation_options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.query_data(::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new(parent: parent, prompt: prompt, context: context, generation_options: generation_options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, query_data_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::GeminiDataAnalytics::V1beta::DataChatService::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::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_test.rb new file mode 100644 index 000000000000..c505bbb7bff2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_test.rb @@ -0,0 +1,566 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/geminidataanalytics/v1beta/data_chat_service_pb" +require "google/cloud/gemini_data_analytics/v1beta/data_chat_service" + +class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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_chat + # Create GRPC objects. + grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::Message.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + inline_context = {} + project = "hello world" + parent = "hello world" + messages = [{}] + + chat_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :chat, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::Context), request["inline_context"] + assert_equal :inline_context, request.context_provider + assert_equal "hello world", request["project"] + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, request["messages"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, chat_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.chat({ inline_context: inline_context, project: project, parent: parent, messages: messages }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.chat inline_context: inline_context, project: project, parent: parent, messages: messages do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.chat ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new(inline_context: inline_context, project: project, parent: parent, messages: messages) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.chat({ inline_context: inline_context, project: project, parent: parent, messages: messages }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.chat(::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new(inline_context: inline_context, project: project, parent: parent, messages: messages), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, chat_client_stub.call_rpc_count + end + end + + def test_create_conversation + # Create GRPC objects. + grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.new + grpc_operation = GRPC::ActiveCall::Operation.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" + conversation_id = "hello world" + conversation = {} + request_id = "hello world" + + create_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_conversation, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["conversation_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation), request["conversation"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_conversation_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_conversation({ parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_conversation parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new(parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_conversation({ parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new(parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_conversation_client_stub.call_rpc_count + end + end + + def test_delete_conversation + # 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_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_conversation, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_conversation_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_conversation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_conversation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_conversation({ 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_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.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_conversation_client_stub.call_rpc_count + end + end + + def test_get_conversation + # Create GRPC objects. + grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.new + grpc_operation = GRPC::ActiveCall::Operation.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_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_conversation, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_conversation_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_conversation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_conversation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_conversation({ 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_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.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_conversation_client_stub.call_rpc_count + end + end + + def test_list_conversations + # Create GRPC objects. + grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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_conversations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_conversations, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest, 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_conversations_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_conversations({ 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_conversations 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_conversations ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.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_conversations({ 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_conversations(::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.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_conversations_client_stub.call_rpc_count + end + end + + def test_list_messages + # Create GRPC objects. + grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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_messages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_messages, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest, 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_messages_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_messages({ 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_messages 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_messages ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.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_messages({ 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_messages(::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.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_messages_client_stub.call_rpc_count + end + end + + def test_query_data + # Create GRPC objects. + grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse.new + grpc_operation = GRPC::ActiveCall::Operation.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" + prompt = "hello world" + context = {} + generation_options = {} + + query_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_data, name + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["prompt"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataContext), request["context"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GenerationOptions), request["generation_options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, query_data_client_stub do + # Create client + client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_data({ parent: parent, prompt: prompt, context: context, generation_options: generation_options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.query_data parent: parent, prompt: prompt, context: context, generation_options: generation_options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.query_data ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new(parent: parent, prompt: prompt, context: context, generation_options: generation_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.query_data({ parent: parent, prompt: prompt, context: context, generation_options: generation_options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.query_data(::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new(parent: parent, prompt: prompt, context: context, generation_options: generation_options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, query_data_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::GeminiDataAnalytics::V1beta::DataChatService::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::GeminiDataAnalytics::V1beta::DataChatService::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::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/helper.rb new file mode 100644 index 000000000000..968201e8049d --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# 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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/rg" + +require "grpc" + +require "ostruct" From 8dc7d758a48183de6761631bc99020b7e81abc17 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 17 Dec 2025 19:07:27 +0000 Subject: [PATCH 2/2] =?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 --- .../geminidataanalytics/v1beta/context_pb.rb | 5 +- .../v1beta/data_chat_service_pb.rb | 4 +- .../geminidataanalytics/v1beta/context.rb | 57 + .../v1beta/data_chat_service.rb | 38 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 --- .../README.md | 154 -- .../Rakefile | 169 --- .../gapic_metadata.json | 102 -- ...cloud-gemini_data_analytics-v1beta.gemspec | 30 - ...ogle-cloud-gemini_data_analytics-v1beta.rb | 21 - .../cloud/gemini_data_analytics/v1beta.rb | 46 - .../v1beta/bindings_override.rb | 75 - .../v1beta/data_agent_service.rb | 56 - .../v1beta/data_agent_service/client.rb | 1303 ----------------- .../v1beta/data_agent_service/credentials.rb | 47 - .../v1beta/data_agent_service/operations.rb | 841 ----------- .../v1beta/data_agent_service/paths.rb | 69 - .../v1beta/data_agent_service/rest.rb | 54 - .../v1beta/data_agent_service/rest/client.rb | 1212 --------------- .../data_agent_service/rest/operations.rb | 925 ------------ .../data_agent_service/rest/service_stub.rb | 573 -------- .../v1beta/data_chat_service.rb | 57 - .../v1beta/data_chat_service/client.rb | 1147 --------------- .../v1beta/data_chat_service/credentials.rb | 47 - .../v1beta/data_chat_service/paths.rb | 102 -- .../v1beta/data_chat_service/rest.rb | 55 - .../v1beta/data_chat_service/rest/client.rb | 1065 -------------- .../data_chat_service/rest/service_stub.rb | 505 ------- .../gemini_data_analytics/v1beta/rest.rb | 39 - .../gemini_data_analytics/v1beta/version.rb | 28 - .../v1beta/agent_context_pb.rb | 44 - .../geminidataanalytics/v1beta/context_pb.rb | 64 - .../v1beta/conversation_pb.rb | 53 - .../v1beta/credentials_pb.rb | 47 - .../v1beta/data_agent_pb.rb | 49 - .../v1beta/data_agent_service_pb.rb | 67 - .../v1beta/data_agent_service_services_pb.rb | 60 - .../v1beta/data_analytics_agent_pb.rb | 46 - .../v1beta/data_chat_service_pb.rb | 95 -- .../v1beta/data_chat_service_services_pb.rb | 61 - .../v1beta/datasource_pb.rb | 70 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 ------ .../proto_docs/google/api/field_behavior.rb | 85 -- .../proto_docs/google/api/field_info.rb | 88 -- .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 --- .../v1beta/agent_context.rb | 35 - .../geminidataanalytics/v1beta/context.rb | 291 ---- .../v1beta/conversation.rb | 155 -- .../geminidataanalytics/v1beta/credentials.rb | 74 - .../geminidataanalytics/v1beta/data_agent.rb | 90 -- .../v1beta/data_agent_service.rb | 267 ---- .../v1beta/data_analytics_agent.rb | 46 - .../v1beta/data_chat_service.rb | 764 ---------- .../geminidataanalytics/v1beta/datasource.rb | 465 ------ .../proto_docs/google/iam/v1/iam_policy.rb | 87 -- .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 ------ .../google/longrunning/operations.rb | 191 --- .../proto_docs/google/protobuf/any.rb | 145 -- .../proto_docs/google/protobuf/duration.rb | 98 -- .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 --- .../proto_docs/google/protobuf/struct.rb | 108 -- .../proto_docs/google/protobuf/timestamp.rb | 127 -- .../proto_docs/google/protobuf/wrappers.rb | 121 -- .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../data_agent_service/create_data_agent.rb | 54 - .../data_agent_service/delete_data_agent.rb | 54 - .../data_agent_service/get_data_agent.rb | 47 - .../data_agent_service/get_iam_policy.rb | 47 - .../list_accessible_data_agents.rb | 51 - .../data_agent_service/list_data_agents.rb | 51 - .../data_agent_service/set_iam_policy.rb | 47 - .../data_agent_service/update_data_agent.rb | 54 - .../snippets/data_chat_service/chat.rb | 50 - .../data_chat_service/create_conversation.rb | 47 - .../data_chat_service/delete_conversation.rb | 47 - .../data_chat_service/get_conversation.rb | 47 - .../data_chat_service/list_conversations.rb | 51 - .../data_chat_service/list_messages.rb | 51 - .../snippets/data_chat_service/query_data.rb | 47 - ...ogle.cloud.geminidataanalytics.v1beta.json | 615 -------- .../data_agent_service_operations_test.rb | 400 ----- .../v1beta/data_agent_service_paths_test.rb | 67 - .../v1beta/data_agent_service_rest_test.rb | 551 ------- .../v1beta/data_agent_service_test.rb | 647 -------- .../v1beta/data_chat_service_paths_test.rb | 91 -- .../v1beta/data_chat_service_rest_test.rb | 492 ------- .../v1beta/data_chat_service_test.rb | 566 ------- .../test/helper.rb | 25 - 102 files changed, 62 insertions(+), 18973 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/README.md delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/google-cloud-gemini_data_analytics-v1beta.gemspec delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google-cloud-gemini_data_analytics-v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/version.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/agent_context_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/credentials_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/agent_context.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/create_data_agent.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/delete_data_agent.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_data_agent.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_accessible_data_agents.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_data_agents.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/update_data_agent.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/chat.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/create_conversation.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/delete_conversation.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/get_conversation.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_conversations.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_messages.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/query_data.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/helper.rb diff --git a/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb b/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb index 88f9f3ebc778..07f3032f172d 100644 --- a/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb +++ b/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb @@ -9,7 +9,7 @@ require 'google/protobuf/wrappers_pb' -descriptor_data = "\n5google/cloud/geminidataanalytics/v1beta/context.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/datasource.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xf9\x07\n\x07\x43ontext\x12\x1f\n\x12system_instruction\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x15\x64\x61tasource_references\x18\x07 \x01(\x0b\x32=.google.cloud.geminidataanalytics.v1beta.DatasourceReferencesB\x03\xe0\x41\x02\x12R\n\x07options\x18\x03 \x01(\x0b\x32<.google.cloud.geminidataanalytics.v1beta.ConversationOptionsB\x03\xe0\x41\x01\x12S\n\x0f\x65xample_queries\x18\x05 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ExampleQueryB\x03\xe0\x41\x01\x12R\n\x0eglossary_terms\x18\x08 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.GlossaryTermB\x03\xe0\x41\x01\x12\x66\n\x14schema_relationships\x18\t \x03(\x0b\x32\x43.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationshipB\x03\xe0\x41\x01\x1a\x84\x04\n\x12SchemaRelationship\x12j\n\x11left_schema_paths\x18\x01 \x01(\x0b\x32O.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths\x12k\n\x12right_schema_paths\x18\x02 \x01(\x0b\x32O.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths\x12[\n\x07sources\x18\x03 \x03(\x0e\x32J.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.Source\x12\x18\n\x10\x63onfidence_score\x18\x04 \x01(\x02\x1a/\n\x0bSchemaPaths\x12\x11\n\ttable_fqn\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\"m\n\x06Source\x12\x16\n\x12SOURCE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x42IGQUERY_JOB_HISTORY\x10\x01\x12\x11\n\rLLM_SUGGESTED\x10\x02\x12\x1e\n\x1a\x42IGQUERY_TABLE_CONSTRAINTS\x10\x03\"Y\n\x0c\x45xampleQuery\x12\x18\n\tsql_query\x18\x65 \x01(\tB\x03\xe0\x41\x01H\x00\x12&\n\x19natural_language_question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x07\n\x05query\"X\n\x0cGlossaryTerm\x12\x19\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06labels\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x86\x02\n\x13\x43onversationOptions\x12I\n\x05\x63hart\x18\x01 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ChartOptionsB\x03\xe0\x41\x01\x12O\n\x08\x61nalysis\x18\x02 \x01(\x0b\x32\x38.google.cloud.geminidataanalytics.v1beta.AnalysisOptionsB\x03\xe0\x41\x01\x12S\n\ndatasource\x18\x03 \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.DatasourceOptionsB\x03\xe0\x41\x01\"Y\n\x11\x44\x61tasourceOptions\x12\x44\n\x1a\x62ig_query_max_billed_bytes\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x03\xe0\x41\x01\"\xd6\x02\n\x0c\x43hartOptions\x12V\n\x05image\x18\x01 \x01(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptionsB\x03\xe0\x41\x01\x1a\xed\x01\n\x0cImageOptions\x12^\n\x08no_image\x18\x01 \x01(\x0b\x32J.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImageH\x00\x12\\\n\x03svg\x18\x02 \x01(\x0b\x32M.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptionsH\x00\x1a\t\n\x07NoImage\x1a\x0c\n\nSvgOptionsB\x06\n\x04kind\"\x87\x01\n\x0f\x41nalysisOptions\x12T\n\x06python\x18\x01 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.PythonB\x03\xe0\x41\x01\x1a\x1e\n\x06Python\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x42\x9d\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x0c\x43ontextProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" +descriptor_data = "\n5google/cloud/geminidataanalytics/v1beta/context.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/datasource.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xd9\x08\n\x07\x43ontext\x12\x1f\n\x12system_instruction\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x15\x64\x61tasource_references\x18\x07 \x01(\x0b\x32=.google.cloud.geminidataanalytics.v1beta.DatasourceReferencesB\x03\xe0\x41\x02\x12R\n\x07options\x18\x03 \x01(\x0b\x32<.google.cloud.geminidataanalytics.v1beta.ConversationOptionsB\x03\xe0\x41\x01\x12S\n\x0f\x65xample_queries\x18\x05 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ExampleQueryB\x03\xe0\x41\x01\x12^\n\x15looker_golden_queries\x18\x0b \x03(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.LookerGoldenQueryB\x03\xe0\x41\x01\x12R\n\x0eglossary_terms\x18\x08 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.GlossaryTermB\x03\xe0\x41\x01\x12\x66\n\x14schema_relationships\x18\t \x03(\x0b\x32\x43.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationshipB\x03\xe0\x41\x01\x1a\x84\x04\n\x12SchemaRelationship\x12j\n\x11left_schema_paths\x18\x01 \x01(\x0b\x32O.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths\x12k\n\x12right_schema_paths\x18\x02 \x01(\x0b\x32O.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths\x12[\n\x07sources\x18\x03 \x03(\x0e\x32J.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.Source\x12\x18\n\x10\x63onfidence_score\x18\x04 \x01(\x02\x1a/\n\x0bSchemaPaths\x12\x11\n\ttable_fqn\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\"m\n\x06Source\x12\x16\n\x12SOURCE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x42IGQUERY_JOB_HISTORY\x10\x01\x12\x11\n\rLLM_SUGGESTED\x10\x02\x12\x1e\n\x1a\x42IGQUERY_TABLE_CONSTRAINTS\x10\x03\"Y\n\x0c\x45xampleQuery\x12\x18\n\tsql_query\x18\x65 \x01(\tB\x03\xe0\x41\x01H\x00\x12&\n\x19natural_language_question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x07\n\x05query\"\x8d\x01\n\x11LookerGoldenQuery\x12\'\n\x1anatural_language_questions\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12O\n\x0clooker_query\x18\x05 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x03\xe0\x41\x01\"\x88\x02\n\x0bLookerQuery\x12\x12\n\x05model\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x65xplore\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ields\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12Q\n\x07\x66ilters\x18\x04 \x03(\x0b\x32;.google.cloud.geminidataanalytics.v1beta.LookerQuery.FilterB\x03\xe0\x41\x01\x12\x12\n\x05sorts\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x17\n\x05limit\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\x30\n\x06\x46ilter\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x08\n\x06_limit\"X\n\x0cGlossaryTerm\x12\x19\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06labels\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x86\x02\n\x13\x43onversationOptions\x12I\n\x05\x63hart\x18\x01 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ChartOptionsB\x03\xe0\x41\x01\x12O\n\x08\x61nalysis\x18\x02 \x01(\x0b\x32\x38.google.cloud.geminidataanalytics.v1beta.AnalysisOptionsB\x03\xe0\x41\x01\x12S\n\ndatasource\x18\x03 \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.DatasourceOptionsB\x03\xe0\x41\x01\"Y\n\x11\x44\x61tasourceOptions\x12\x44\n\x1a\x62ig_query_max_billed_bytes\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x03\xe0\x41\x01\"\xd6\x02\n\x0c\x43hartOptions\x12V\n\x05image\x18\x01 \x01(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptionsB\x03\xe0\x41\x01\x1a\xed\x01\n\x0cImageOptions\x12^\n\x08no_image\x18\x01 \x01(\x0b\x32J.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImageH\x00\x12\\\n\x03svg\x18\x02 \x01(\x0b\x32M.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptionsH\x00\x1a\t\n\x07NoImage\x1a\x0c\n\nSvgOptionsB\x06\n\x04kind\"\x87\x01\n\x0f\x41nalysisOptions\x12T\n\x06python\x18\x01 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.PythonB\x03\xe0\x41\x01\x1a\x1e\n\x06Python\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x42\x9d\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x0c\x43ontextProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -46,6 +46,9 @@ module V1beta Context::SchemaRelationship::SchemaPaths = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths").msgclass Context::SchemaRelationship::Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.Source").enummodule ExampleQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExampleQuery").msgclass + LookerGoldenQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery").msgclass + LookerQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerQuery").msgclass + LookerQuery::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter").msgclass GlossaryTerm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.GlossaryTerm").msgclass ConversationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ConversationOptions").msgclass DatasourceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DatasourceOptions").msgclass diff --git a/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb b/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb index bfd13ab586b2..52eacbac70aa 100644 --- a/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb +++ b/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb @@ -17,7 +17,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n?google/cloud/geminidataanalytics/v1beta/data_chat_service.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/geminidataanalytics/v1beta/context.proto\x1a:google/cloud/geminidataanalytics/v1beta/conversation.proto\x1a\x39google/cloud/geminidataanalytics/v1beta/credentials.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/datasource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x02\n\x10QueryDataRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.QueryDataContextB\x03\xe0\x41\x02\x12[\n\x12generation_options\x18\x04 \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.GenerationOptionsB\x03\xe0\x41\x01\"\xb8\x01\n\x11GenerationOptions\x12\"\n\x15generate_query_result\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n generate_natural_language_answer\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12!\n\x14generate_explanation\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n generate_disambiguation_question\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"u\n\x10QueryDataContext\x12\x61\n\x15\x64\x61tasource_references\x18\x01 \x01(\x0b\x32=.google.cloud.geminidataanalytics.v1beta.DatasourceReferencesB\x03\xe0\x41\x02\"\xde\x01\n\x11QueryDataResponse\x12\x17\n\x0fgenerated_query\x18\x01 \x01(\t\x12\x1a\n\x12intent_explanation\x18\x02 \x01(\t\x12R\n\x0cquery_result\x18\x03 \x01(\x0b\x32<.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult\x12\x1f\n\x17natural_language_answer\x18\x04 \x01(\t\x12\x1f\n\x17\x64isambiguation_question\x18\x05 \x03(\t\"\xa4\x03\n\x13\x45xecutedQueryResult\x12T\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x43.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column\x12N\n\x04rows\x18\x02 \x03(\x0b\x32@.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row\x12\x17\n\x0ftotal_row_count\x18\x03 \x01(\x03\x12\x16\n\x0epartial_result\x18\x04 \x01(\x08\x12\x1d\n\x15query_execution_error\x18\x05 \x01(\t\x1a$\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x1a\x16\n\x05Value\x12\r\n\x05value\x18\x01 \x01(\t\x1aY\n\x03Row\x12R\n\x06values\x18\x01 \x03(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value\"\xa4\x01\n\x13ListMessagesRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/Conversation\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x14ListMessagesResponse\x12I\n\x08messages\x18\x01 \x03(\x0b\x32\x37.google.cloud.geminidataanalytics.v1beta.StorageMessage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"g\n\x0eStorageMessage\x12\x12\n\nmessage_id\x18\x01 \x01(\t\x12\x41\n\x07message\x18\x02 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.Message\"\xd4\x04\n\x0b\x43hatRequest\x12O\n\x0einline_context\x18\x65 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x01H\x00\x12\x65\n\x16\x63onversation_reference\x18g \x01(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.ConversationReferenceB\x03\xe0\x41\x01H\x00\x12\\\n\x12\x64\x61ta_agent_context\x18h \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.DataAgentContextB\x03\xe0\x41\x01H\x00\x12u\n\x1f\x63lient_managed_resource_context\x18i \x01(\x0b\x32\x45.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContextB\x03\xe0\x41\x01H\x00\x12\x46\n\x07project\x18\x01 \x01(\tB5\x18\x01\xe0\x41\x01\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x08messages\x18\x02 \x03(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.MessageB\x03\xe0\x41\x02\x42\x12\n\x10\x63ontext_provider\"\xe3\x02\n\x10\x44\x61taAgentContext\x12H\n\ndata_agent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,geminidataanalytics.googleapis.com/DataAgent\x12N\n\x0b\x63redentials\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.CredentialsB\x03\xe0\x41\x01\x12\x66\n\x0f\x63ontext_version\x18\x03 \x01(\x0e\x32H.google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersionB\x03\xe0\x41\x01\"M\n\x0e\x43ontextVersion\x12\x1f\n\x1b\x43ONTEXT_VERSION_UNSPECIFIED\x10\x00\x12\x0b\n\x07STAGING\x10\x01\x12\r\n\tPUBLISHED\x10\x02\"\xc2\x01\n\x15\x43onversationReference\x12M\n\x0c\x63onversation\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/Conversation\x12Z\n\x12\x64\x61ta_agent_context\x18\x03 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.DataAgentContextB\x03\xe0\x41\x02\"\xa2\x01\n\x1c\x43lientManagedResourceContext\x12M\n\x0einline_context\x18\x01 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x02\x12\x1c\n\x0f\x63onversation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61gent_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xfe\x01\n\x07Message\x12L\n\x0cuser_message\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.UserMessageH\x00\x12P\n\x0esystem_message\x18\x03 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.SystemMessageH\x00\x12\x32\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nmessage_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x06\n\x04kind\"%\n\x0bUserMessage\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\"\xc8\x04\n\rSystemMessage\x12\x44\n\x04text\x18\x01 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.TextMessageH\x00\x12H\n\x06schema\x18\x02 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.SchemaMessageH\x00\x12\x44\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.DataMessageH\x00\x12L\n\x08\x61nalysis\x18\x04 \x01(\x0b\x32\x38.google.cloud.geminidataanalytics.v1beta.AnalysisMessageH\x00\x12\x46\n\x05\x63hart\x18\x05 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ChartMessageH\x00\x12\x46\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ErrorMessageH\x00\x12W\n\x0f\x65xample_queries\x18\r \x01(\x0b\x32\x37.google.cloud.geminidataanalytics.v1beta.ExampleQueriesB\x03\xe0\x41\x01H\x00\x12\x15\n\x08group_id\x18\x0c \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04kindB\x0b\n\t_group_id\"\xce\x01\n\x0bTextMessage\x12\x12\n\x05parts\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12U\n\ttext_type\x18\x02 \x01(\x0e\x32=.google.cloud.geminidataanalytics.v1beta.TextMessage.TextTypeB\x03\xe0\x41\x01\"T\n\x08TextType\x12\x19\n\x15TEXT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46INAL_RESPONSE\x10\x01\x12\x0b\n\x07THOUGHT\x10\x02\x12\x0c\n\x08PROGRESS\x10\x03\"\xa7\x01\n\rSchemaMessage\x12\x45\n\x05query\x18\x01 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.SchemaQueryH\x00\x12G\n\x06result\x18\x02 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.SchemaResultH\x00\x42\x06\n\x04kind\"$\n\x0bSchemaQuery\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\"]\n\x0cSchemaResult\x12M\n\x0b\x64\x61tasources\x18\x01 \x03(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DatasourceB\x03\xe0\x41\x01\"\xe5\x02\n\x0b\x44\x61taMessage\x12\x43\n\x05query\x18\x01 \x01(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataQueryH\x00\x12\x17\n\rgenerated_sql\x18\x02 \x01(\tH\x00\x12\x45\n\x06result\x18\x03 \x01(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DataResultH\x00\x12Z\n\x16generated_looker_query\x18\x04 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x02\x18\x01H\x00\x12M\n\rbig_query_job\x18\x05 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.BigQueryJobH\x00\x42\x06\n\x04kind\"\x88\x02\n\x0bLookerQuery\x12\x12\n\x05model\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x65xplore\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ields\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12Q\n\x07\x66ilters\x18\x04 \x03(\x0b\x32;.google.cloud.geminidataanalytics.v1beta.LookerQuery.FilterB\x03\xe0\x41\x01\x12\x12\n\x05sorts\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x17\n\x05limit\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\x30\n\x06\x46ilter\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x08\n\x06_limit\"\xdf\x01\n\tDataQuery\x12K\n\x06looker\x18\x04 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x03\xe0\x41\x01H\x00\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12M\n\x0b\x64\x61tasources\x18\x02 \x03(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DatasourceB\x03\xe0\x41\x01\x42\x0c\n\nquery_type\"\x91\x01\n\nDataResult\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06schema\x18\x05 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\x12*\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\xf9\x01\n\x0b\x42igQueryJob\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08location\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12_\n\x11\x64\x65stination_table\x18\x03 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferenceB\x03\xe0\x41\x01\x12\x44\n\x06schema\x18\x07 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\"\xb4\x01\n\x0f\x41nalysisMessage\x12G\n\x05query\x18\x01 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.AnalysisQueryH\x00\x12P\n\x0eprogress_event\x18\x02 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.AnalysisEventH\x00\x42\x06\n\x04kind\"F\n\rAnalysisQuery\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x64\x61ta_result_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\xaa\x02\n\rAnalysisEvent\x12\x1b\n\x11planner_reasoning\x18\x02 \x01(\tH\x00\x12\x1b\n\x11\x63oder_instruction\x18\x03 \x01(\tH\x00\x12\x0e\n\x04\x63ode\x18\x04 \x01(\tH\x00\x12\x1a\n\x10\x65xecution_output\x18\x05 \x01(\tH\x00\x12\x19\n\x0f\x65xecution_error\x18\x06 \x01(\tH\x00\x12 \n\x16result_vega_chart_json\x18\x07 \x01(\tH\x00\x12!\n\x17result_natural_language\x18\x08 \x01(\tH\x00\x12\x19\n\x0fresult_csv_data\x18\t \x01(\tH\x00\x12\x1f\n\x15result_reference_data\x18\n \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x0b \x01(\tH\x00\x42\x06\n\x04kind\"\xa4\x01\n\x0c\x43hartMessage\x12\x44\n\x05query\x18\x01 \x01(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.ChartQueryH\x00\x12\x46\n\x06result\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.ChartResultH\x00\x42\x06\n\x04kind\"F\n\nChartQuery\x12\x19\n\x0cinstructions\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x61ta_result_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x0b\x43hartResult\x12\x31\n\x0bvega_config\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x41\n\x05image\x18\x03 \x01(\x0b\x32-.google.cloud.geminidataanalytics.v1beta.BlobB\x03\xe0\x41\x01\"!\n\x0c\x45rrorMessage\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x03\"e\n\x0e\x45xampleQueries\x12S\n\x0f\x65xample_queries\x18\x01 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ExampleQueryB\x03\xe0\x41\x01\"1\n\x04\x42lob\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x32\xae\x0c\n\x0f\x44\x61taChatService\x12\xa9\x01\n\x04\x43hat\x12\x34.google.cloud.geminidataanalytics.v1beta.ChatRequest\x1a\x30.google.cloud.geminidataanalytics.v1beta.Message\"7\x82\xd3\xe4\x93\x02\x31\",/v1beta/{parent=projects/*/locations/*}:chat:\x01*0\x01\x12\x82\x02\n\x12\x43reateConversation\x12\x42.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest\x1a\x35.google.cloud.geminidataanalytics.v1beta.Conversation\"q\xda\x41#parent,conversation,conversation_id\x82\xd3\xe4\x93\x02\x45\"5/v1beta/{parent=projects/*/locations/*}/conversations:\x0c\x63onversation\x12\xb6\x01\n\x12\x44\x65leteConversation\x12\x42.google.cloud.geminidataanalytics.v1beta.DeleteConversationRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta/{name=projects/*/locations/*/conversations/*}\x12\xcf\x01\n\x0fGetConversation\x12?.google.cloud.geminidataanalytics.v1beta.GetConversationRequest\x1a\x35.google.cloud.geminidataanalytics.v1beta.Conversation\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/conversations/*}\x12\xe2\x01\n\x11ListConversations\x12\x41.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest\x1a\x42.google.cloud.geminidataanalytics.v1beta.ListConversationsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*}/conversations\x12\xde\x01\n\x0cListMessages\x12<.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest\x1a=.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1beta/{parent=projects/*/locations/*/conversations/*}/messages\x12\xc0\x01\n\tQueryData\x12\x39.google.cloud.geminidataanalytics.v1beta.QueryDataRequest\x1a:.google.cloud.geminidataanalytics.v1beta.QueryDataResponse\"<\x82\xd3\xe4\x93\x02\x36\"1/v1beta/{parent=projects/*/locations/*}:queryData:\x01*\x1aV\xca\x41\"geminidataanalytics.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa5\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x14\x44\x61taChatServiceProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" +descriptor_data = "\n?google/cloud/geminidataanalytics/v1beta/data_chat_service.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/geminidataanalytics/v1beta/context.proto\x1a:google/cloud/geminidataanalytics/v1beta/conversation.proto\x1a\x39google/cloud/geminidataanalytics/v1beta/credentials.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/datasource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x02\n\x10QueryDataRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.QueryDataContextB\x03\xe0\x41\x02\x12[\n\x12generation_options\x18\x04 \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.GenerationOptionsB\x03\xe0\x41\x01\"\xb8\x01\n\x11GenerationOptions\x12\"\n\x15generate_query_result\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n generate_natural_language_answer\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12!\n\x14generate_explanation\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n generate_disambiguation_question\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"u\n\x10QueryDataContext\x12\x61\n\x15\x64\x61tasource_references\x18\x01 \x01(\x0b\x32=.google.cloud.geminidataanalytics.v1beta.DatasourceReferencesB\x03\xe0\x41\x02\"\xde\x01\n\x11QueryDataResponse\x12\x17\n\x0fgenerated_query\x18\x01 \x01(\t\x12\x1a\n\x12intent_explanation\x18\x02 \x01(\t\x12R\n\x0cquery_result\x18\x03 \x01(\x0b\x32<.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult\x12\x1f\n\x17natural_language_answer\x18\x04 \x01(\t\x12\x1f\n\x17\x64isambiguation_question\x18\x05 \x03(\t\"\xa4\x03\n\x13\x45xecutedQueryResult\x12T\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x43.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column\x12N\n\x04rows\x18\x02 \x03(\x0b\x32@.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row\x12\x17\n\x0ftotal_row_count\x18\x03 \x01(\x03\x12\x16\n\x0epartial_result\x18\x04 \x01(\x08\x12\x1d\n\x15query_execution_error\x18\x05 \x01(\t\x1a$\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x1a\x16\n\x05Value\x12\r\n\x05value\x18\x01 \x01(\t\x1aY\n\x03Row\x12R\n\x06values\x18\x01 \x03(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value\"\xa4\x01\n\x13ListMessagesRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/Conversation\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x14ListMessagesResponse\x12I\n\x08messages\x18\x01 \x03(\x0b\x32\x37.google.cloud.geminidataanalytics.v1beta.StorageMessage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"g\n\x0eStorageMessage\x12\x12\n\nmessage_id\x18\x01 \x01(\t\x12\x41\n\x07message\x18\x02 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.Message\"\xd4\x04\n\x0b\x43hatRequest\x12O\n\x0einline_context\x18\x65 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x01H\x00\x12\x65\n\x16\x63onversation_reference\x18g \x01(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.ConversationReferenceB\x03\xe0\x41\x01H\x00\x12\\\n\x12\x64\x61ta_agent_context\x18h \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.DataAgentContextB\x03\xe0\x41\x01H\x00\x12u\n\x1f\x63lient_managed_resource_context\x18i \x01(\x0b\x32\x45.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContextB\x03\xe0\x41\x01H\x00\x12\x46\n\x07project\x18\x01 \x01(\tB5\x18\x01\xe0\x41\x01\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x08messages\x18\x02 \x03(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.MessageB\x03\xe0\x41\x02\x42\x12\n\x10\x63ontext_provider\"\xe3\x02\n\x10\x44\x61taAgentContext\x12H\n\ndata_agent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,geminidataanalytics.googleapis.com/DataAgent\x12N\n\x0b\x63redentials\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.CredentialsB\x03\xe0\x41\x01\x12\x66\n\x0f\x63ontext_version\x18\x03 \x01(\x0e\x32H.google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersionB\x03\xe0\x41\x01\"M\n\x0e\x43ontextVersion\x12\x1f\n\x1b\x43ONTEXT_VERSION_UNSPECIFIED\x10\x00\x12\x0b\n\x07STAGING\x10\x01\x12\r\n\tPUBLISHED\x10\x02\"\xc2\x01\n\x15\x43onversationReference\x12M\n\x0c\x63onversation\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/Conversation\x12Z\n\x12\x64\x61ta_agent_context\x18\x03 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.DataAgentContextB\x03\xe0\x41\x02\"\xa2\x01\n\x1c\x43lientManagedResourceContext\x12M\n\x0einline_context\x18\x01 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x02\x12\x1c\n\x0f\x63onversation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61gent_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xfe\x01\n\x07Message\x12L\n\x0cuser_message\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.UserMessageH\x00\x12P\n\x0esystem_message\x18\x03 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.SystemMessageH\x00\x12\x32\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nmessage_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x06\n\x04kind\"%\n\x0bUserMessage\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\"\xc8\x04\n\rSystemMessage\x12\x44\n\x04text\x18\x01 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.TextMessageH\x00\x12H\n\x06schema\x18\x02 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.SchemaMessageH\x00\x12\x44\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.DataMessageH\x00\x12L\n\x08\x61nalysis\x18\x04 \x01(\x0b\x32\x38.google.cloud.geminidataanalytics.v1beta.AnalysisMessageH\x00\x12\x46\n\x05\x63hart\x18\x05 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ChartMessageH\x00\x12\x46\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ErrorMessageH\x00\x12W\n\x0f\x65xample_queries\x18\r \x01(\x0b\x32\x37.google.cloud.geminidataanalytics.v1beta.ExampleQueriesB\x03\xe0\x41\x01H\x00\x12\x15\n\x08group_id\x18\x0c \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04kindB\x0b\n\t_group_id\"\xce\x01\n\x0bTextMessage\x12\x12\n\x05parts\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12U\n\ttext_type\x18\x02 \x01(\x0e\x32=.google.cloud.geminidataanalytics.v1beta.TextMessage.TextTypeB\x03\xe0\x41\x01\"T\n\x08TextType\x12\x19\n\x15TEXT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46INAL_RESPONSE\x10\x01\x12\x0b\n\x07THOUGHT\x10\x02\x12\x0c\n\x08PROGRESS\x10\x03\"\xa7\x01\n\rSchemaMessage\x12\x45\n\x05query\x18\x01 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.SchemaQueryH\x00\x12G\n\x06result\x18\x02 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.SchemaResultH\x00\x42\x06\n\x04kind\"$\n\x0bSchemaQuery\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\"]\n\x0cSchemaResult\x12M\n\x0b\x64\x61tasources\x18\x01 \x03(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DatasourceB\x03\xe0\x41\x01\"\xe5\x02\n\x0b\x44\x61taMessage\x12\x43\n\x05query\x18\x01 \x01(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataQueryH\x00\x12\x17\n\rgenerated_sql\x18\x02 \x01(\tH\x00\x12\x45\n\x06result\x18\x03 \x01(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DataResultH\x00\x12Z\n\x16generated_looker_query\x18\x04 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x02\x18\x01H\x00\x12M\n\rbig_query_job\x18\x05 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.BigQueryJobH\x00\x42\x06\n\x04kind\"\xdf\x01\n\tDataQuery\x12K\n\x06looker\x18\x04 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x03\xe0\x41\x01H\x00\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12M\n\x0b\x64\x61tasources\x18\x02 \x03(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DatasourceB\x03\xe0\x41\x01\x42\x0c\n\nquery_type\"\x91\x01\n\nDataResult\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06schema\x18\x05 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\x12*\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\xf9\x01\n\x0b\x42igQueryJob\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08location\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12_\n\x11\x64\x65stination_table\x18\x03 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferenceB\x03\xe0\x41\x01\x12\x44\n\x06schema\x18\x07 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\"\xb4\x01\n\x0f\x41nalysisMessage\x12G\n\x05query\x18\x01 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.AnalysisQueryH\x00\x12P\n\x0eprogress_event\x18\x02 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.AnalysisEventH\x00\x42\x06\n\x04kind\"F\n\rAnalysisQuery\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x64\x61ta_result_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\xaa\x02\n\rAnalysisEvent\x12\x1b\n\x11planner_reasoning\x18\x02 \x01(\tH\x00\x12\x1b\n\x11\x63oder_instruction\x18\x03 \x01(\tH\x00\x12\x0e\n\x04\x63ode\x18\x04 \x01(\tH\x00\x12\x1a\n\x10\x65xecution_output\x18\x05 \x01(\tH\x00\x12\x19\n\x0f\x65xecution_error\x18\x06 \x01(\tH\x00\x12 \n\x16result_vega_chart_json\x18\x07 \x01(\tH\x00\x12!\n\x17result_natural_language\x18\x08 \x01(\tH\x00\x12\x19\n\x0fresult_csv_data\x18\t \x01(\tH\x00\x12\x1f\n\x15result_reference_data\x18\n \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x0b \x01(\tH\x00\x42\x06\n\x04kind\"\xa4\x01\n\x0c\x43hartMessage\x12\x44\n\x05query\x18\x01 \x01(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.ChartQueryH\x00\x12\x46\n\x06result\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.ChartResultH\x00\x42\x06\n\x04kind\"F\n\nChartQuery\x12\x19\n\x0cinstructions\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x61ta_result_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x0b\x43hartResult\x12\x31\n\x0bvega_config\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x41\n\x05image\x18\x03 \x01(\x0b\x32-.google.cloud.geminidataanalytics.v1beta.BlobB\x03\xe0\x41\x01\"!\n\x0c\x45rrorMessage\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x03\"e\n\x0e\x45xampleQueries\x12S\n\x0f\x65xample_queries\x18\x01 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ExampleQueryB\x03\xe0\x41\x01\"1\n\x04\x42lob\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x32\xae\x0c\n\x0f\x44\x61taChatService\x12\xa9\x01\n\x04\x43hat\x12\x34.google.cloud.geminidataanalytics.v1beta.ChatRequest\x1a\x30.google.cloud.geminidataanalytics.v1beta.Message\"7\x82\xd3\xe4\x93\x02\x31\",/v1beta/{parent=projects/*/locations/*}:chat:\x01*0\x01\x12\x82\x02\n\x12\x43reateConversation\x12\x42.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest\x1a\x35.google.cloud.geminidataanalytics.v1beta.Conversation\"q\xda\x41#parent,conversation,conversation_id\x82\xd3\xe4\x93\x02\x45\"5/v1beta/{parent=projects/*/locations/*}/conversations:\x0c\x63onversation\x12\xb6\x01\n\x12\x44\x65leteConversation\x12\x42.google.cloud.geminidataanalytics.v1beta.DeleteConversationRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta/{name=projects/*/locations/*/conversations/*}\x12\xcf\x01\n\x0fGetConversation\x12?.google.cloud.geminidataanalytics.v1beta.GetConversationRequest\x1a\x35.google.cloud.geminidataanalytics.v1beta.Conversation\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/conversations/*}\x12\xe2\x01\n\x11ListConversations\x12\x41.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest\x1a\x42.google.cloud.geminidataanalytics.v1beta.ListConversationsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*}/conversations\x12\xde\x01\n\x0cListMessages\x12<.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest\x1a=.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1beta/{parent=projects/*/locations/*/conversations/*}/messages\x12\xc0\x01\n\tQueryData\x12\x39.google.cloud.geminidataanalytics.v1beta.QueryDataRequest\x1a:.google.cloud.geminidataanalytics.v1beta.QueryDataResponse\"<\x82\xd3\xe4\x93\x02\x36\"1/v1beta/{parent=projects/*/locations/*}:queryData:\x01*\x1aV\xca\x41\"geminidataanalytics.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa5\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x14\x44\x61taChatServiceProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -77,8 +77,6 @@ module V1beta SchemaQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SchemaQuery").msgclass SchemaResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SchemaResult").msgclass DataMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataMessage").msgclass - LookerQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerQuery").msgclass - LookerQuery::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter").msgclass DataQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataQuery").msgclass DataResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataResult").msgclass BigQueryJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.BigQueryJob").msgclass diff --git a/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb b/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb index 7cc459de2b2c..d2999b2a3911 100644 --- a/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb +++ b/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb @@ -41,6 +41,11 @@ module V1beta # Optional. A list of example queries, providing examples of relevant and # commonly used SQL queries and their corresponding natural language queries # optionally present. Currently only used for BigQuery data sources. + # @!attribute [rw] looker_golden_queries + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::LookerGoldenQuery>] + # Optional. A list of golden queries, providing examples of relevant and + # commonly used Looker queries and their corresponding natural language + # queries optionally present. # @!attribute [rw] glossary_terms # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::GlossaryTerm>] # Optional. Term definitions (currently, only user authored) @@ -126,6 +131,58 @@ class ExampleQuery extend ::Google::Protobuf::MessageExts::ClassMethods end + # A golden query for Looker, including natural language questions and a + # corresponding Looker Query. Analogous to ExampleQuery. + # @!attribute [rw] natural_language_questions + # @return [::Array<::String>] + # Optional. Natural language questions that a user might ask. + # For example: "How many orders were placed last month?" + # @!attribute [rw] looker_query + # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery] + # Optional. The Looker Query corresponding to the natural language questions. + class LookerGoldenQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Looker Query Object + # [Looker API + # documentation](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query). + # @!attribute [rw] model + # @return [::String] + # Required. The LookML model used to generate the query. + # @!attribute [rw] explore + # @return [::String] + # Required. The LookML explore used to generate the query. + # @!attribute [rw] fields + # @return [::Array<::String>] + # Optional. The fields to retrieve from the explore. + # @!attribute [rw] filters + # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery::Filter>] + # Optional. The filters to apply to the explore. + # @!attribute [rw] sorts + # @return [::Array<::String>] + # Optional. The sorts to apply to the explore. + # @!attribute [rw] limit + # @return [::String] + # Optional. Limit in the query. + class LookerQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A Looker query filter. + # @!attribute [rw] field + # @return [::String] + # Required. The field to filter on. + # @!attribute [rw] value + # @return [::String] + # Required. The value for the field to filter on. + class Filter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + # Definition of a term within a specific domain. # @!attribute [rw] display_name # @return [::String] diff --git a/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb b/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb index be28ed29551a..175e661f19e1 100644 --- a/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb +++ b/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb @@ -506,44 +506,6 @@ class DataMessage extend ::Google::Protobuf::MessageExts::ClassMethods end - # A query for retrieving data from a Looker Explore. See - # [Run Inline - # Query](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query). - # @!attribute [rw] model - # @return [::String] - # Required. The LookML model used to generate the query. - # @!attribute [rw] explore - # @return [::String] - # Required. The LookML Explore used to generate the query. - # @!attribute [rw] fields - # @return [::Array<::String>] - # Optional. The fields to retrieve from the Explore. - # @!attribute [rw] filters - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery::Filter>] - # Optional. The filters to apply to the Explore. - # @!attribute [rw] sorts - # @return [::Array<::String>] - # Optional. The sorts to apply to the Explore. - # @!attribute [rw] limit - # @return [::String] - # Optional. Limit in the query. - class LookerQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A Looker query filter. - # @!attribute [rw] field - # @return [::String] - # Required. The field to filter on. - # @!attribute [rw] value - # @return [::String] - # Required. The value f field to filter on. - class Filter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - # A query for retrieving data. # @!attribute [rw] looker # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.gitignore b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.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-gemini_data_analytics-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.repo-metadata.json deleted file mode 100644 index 6e2c2632e0fd..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "geminidataanalytics.googleapis.com", - "api_shortname": "geminidataanalytics", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest", - "distribution_name": "google-cloud-gemini_data_analytics-v1beta", - "is_cloud": true, - "language": "ruby", - "name": "geminidataanalytics", - "name_pretty": "Data Analytics API with Gemini V1BETA API", - "product_documentation": "https://cloud.google.com/gemini/docs/conversational-analytics-api/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-gemini_data_analytics-v1beta is the official client library for the Data Analytics API with Gemini V1BETA API. Note that google-cloud-gemini_data_analytics-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gemini_data_analytics instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/gemini/docs/conversational-analytics-api/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.rubocop.yml deleted file mode 100644 index 172df49db402..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-gemini_data_analytics-v1beta.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-gemini_data_analytics-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.toys.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.toys.rb deleted file mode 100644 index 9a210f1427c7..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/.yardopts b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.yardopts deleted file mode 100644 index fcdc9029f088..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Data Analytics API with Gemini V1BETA 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-gemini_data_analytics-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/AUTHENTICATION.md deleted file mode 100644 index ebad6702f055..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta 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/gemini_data_analytics/v1beta" - -client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/gemini_data_analytics/v1beta" - -::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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-gemini_data_analytics-v1beta -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/gemini_data_analytics/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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-gemini_data_analytics-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Gemfile b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/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-gemini_data_analytics-v1beta/README.md b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/README.md deleted file mode 100644 index 05eceb828b4c..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Data Analytics API with Gemini V1BETA API - -API Client library for the Data Analytics API with Gemini V1BETA API - -google-cloud-gemini_data_analytics-v1beta is the official client library for the Data Analytics API with Gemini V1BETA API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Data Analytics API with Gemini V1BETA API. Most users should consider using -the main client gem, -[google-cloud-gemini_data_analytics](https://rubygems.org/gems/google-cloud-gemini_data_analytics). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-gemini_data_analytics-v1beta -``` - -## 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/geminidataanalytics.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/gemini_data_analytics/v1beta" - -client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new -request = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new # (request fields as keyword arguments...) -response = client.list_data_agents request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/gemini/docs/conversational-analytics-api/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/gemini_data_analytics/v1beta" -require "logger" - -client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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-gemini_data_analytics`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-gemini_data_analytics-v1beta`. -_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-gemini_data_analytics`. -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-gemini_data_analytics-v1beta`. - -### 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-gemini_data_analytics-v1beta/Rakefile b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Rakefile deleted file mode 100644 index 85c10bdea567..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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-gemini_data_analytics-v1beta 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/gemini_data_analytics/v1beta/data_agent_service/credentials" - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-gemini_data_analytics-v1beta" - header "google-cloud-gemini_data_analytics-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-gemini_data_analytics-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta 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-gemini_data_analytics-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/gapic_metadata.json deleted file mode 100644 index 34d045e95665..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/gapic_metadata.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.geminidataanalytics.v1beta", - "libraryPackage": "::Google::Cloud::GeminiDataAnalytics::V1beta", - "services": { - "DataAgentService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client", - "rpcs": { - "ListDataAgents": { - "methods": [ - "list_data_agents" - ] - }, - "ListAccessibleDataAgents": { - "methods": [ - "list_accessible_data_agents" - ] - }, - "GetDataAgent": { - "methods": [ - "get_data_agent" - ] - }, - "CreateDataAgent": { - "methods": [ - "create_data_agent" - ] - }, - "UpdateDataAgent": { - "methods": [ - "update_data_agent" - ] - }, - "DeleteDataAgent": { - "methods": [ - "delete_data_agent" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - } - } - } - } - }, - "DataChatService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client", - "rpcs": { - "Chat": { - "methods": [ - "chat" - ] - }, - "CreateConversation": { - "methods": [ - "create_conversation" - ] - }, - "DeleteConversation": { - "methods": [ - "delete_conversation" - ] - }, - "GetConversation": { - "methods": [ - "get_conversation" - ] - }, - "ListConversations": { - "methods": [ - "list_conversations" - ] - }, - "ListMessages": { - "methods": [ - "list_messages" - ] - }, - "QueryData": { - "methods": [ - "query_data" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/google-cloud-gemini_data_analytics-v1beta.gemspec b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/google-cloud-gemini_data_analytics-v1beta.gemspec deleted file mode 100644 index a163573e82ce..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/google-cloud-gemini_data_analytics-v1beta.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/gemini_data_analytics/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-gemini_data_analytics-v1beta" - gem.version = Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-gemini_data_analytics-v1beta is the official client library for the Data Analytics API with Gemini V1BETA API. Note that google-cloud-gemini_data_analytics-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gemini_data_analytics instead. See the readme for more details." - gem.summary = "API Client library for the Data Analytics API with Gemini V1BETA API" - 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.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google-cloud-gemini_data_analytics-v1beta.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google-cloud-gemini_data_analytics-v1beta.rb deleted file mode 100644 index 5266e28165e1..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google-cloud-gemini_data_analytics-v1beta.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/gemini_data_analytics/v1beta" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta.rb deleted file mode 100644 index c4b2f8a9f9ac..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/gemini_data_analytics/v1beta/data_agent_service" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service" -require "google/cloud/gemini_data_analytics/v1beta/version" - -module Google - module Cloud - module GeminiDataAnalytics - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/gemini_data_analytics/v1beta" - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/gemini_data_analytics/v1beta" - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - module V1beta - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/cloud/gemini_data_analytics/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb deleted file mode 100644 index 40aff60653e5..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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" - -module Google - module Cloud - module GeminiDataAnalytics - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/gemini_data_analytics/v1beta/rest" - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - module V1beta - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "GeminiDataAnalytics"] - 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 = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb deleted file mode 100644 index 4c1c719e08ed..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/gemini_data_analytics/v1beta/version" - -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/client" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest" - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - ## - # Service describing handlers for resources. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/gemini_data_analytics/v1beta/data_agent_service" - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest" - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - module DataAgentService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_agent_service", "helpers.rb" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb deleted file mode 100644 index 1960ffdb8f05..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/client.rb +++ /dev/null @@ -1,1303 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_agent_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - module DataAgentService - ## - # Client for the DataAgentService service. - # - # Service describing handlers for resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_agent_service_stub - - ## - # Configure the DataAgentService Client class. - # - # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataAgentService clients - # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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", "GeminiDataAnalytics", "V1beta"] - 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.timeout = 600.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataAgentService 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::GeminiDataAnalytics::V1beta::DataAgentService::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_agent_service_stub.universe_domain - end - - ## - # Create a new DataAgentService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataAgentService 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/geminidataanalytics/v1beta/data_agent_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @data_agent_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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_agent_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 - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_agent_service_stub.endpoint - config.universe_domain = @data_agent_service_stub.universe_domain - config.logger = @data_agent_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_agent_service_stub.logger - end - - # Service calls - - ## - # Lists DataAgents in a given project and location. - # - # @overload list_data_agents(request, options = nil) - # Pass arguments to `list_data_agents` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil) - # Pass arguments to `list_data_agents` via keyword arguments. Note that at - # least one keyword argument is 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. Parent value for ListDataAgentsRequest. - # @param page_size [::Integer] - # Optional. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataAgents` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDataAgents` must - # match the call that provided the page token. The service may return fewer - # than this value. - # @param filter [::String] - # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for - # syntax. - # @param order_by [::String] - # Optional. User specification for how to order the results. - # @param show_deleted [::Boolean] - # Optional. If true, the list results will include soft-deleted DataAgents. - # Defaults to false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new - # - # # Call the list_data_agents method. - # result = client.list_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. - # p item - # end - # - def list_data_agents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest - - # Converts hash and nil to 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_agents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_agents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_agents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.call_rpc :list_data_agents, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_agent_service_stub, :list_data_agents, 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 - - ## - # Lists DataAgents that are accessible to the caller in a given project and - # location. - # - # @overload list_accessible_data_agents(request, options = nil) - # Pass arguments to `list_accessible_data_agents` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_accessible_data_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil, creator_filter: nil) - # Pass arguments to `list_accessible_data_agents` via keyword arguments. Note that at - # least one keyword argument is 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. Parent value for ListAccessibleDataAgentsRequest. - # @param page_size [::Integer] - # Optional. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccessibleDataAgents` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessibleDataAgents` must match the call that provided the page - # token. The service may return fewer than this value. - # @param filter [::String] - # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for - # syntax. - # @param order_by [::String] - # Optional. User specification for how to order the results. - # @param show_deleted [::Boolean] - # Optional. If true, the list results will include soft-deleted DataAgents. - # Defaults to false. - # @param creator_filter [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest::CreatorFilter] - # Optional. Filter for the creator of the agent. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new - # - # # Call the list_accessible_data_agents method. - # result = client.list_accessible_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. - # p item - # end - # - def list_accessible_data_agents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest - - # Converts hash and nil to 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_accessible_data_agents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_accessible_data_agents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_accessible_data_agents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.call_rpc :list_accessible_data_agents, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_agent_service_stub, :list_accessible_data_agents, 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 details of a single DataAgent. - # - # @overload get_data_agent(request, options = nil) - # Pass arguments to `get_data_agent` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(name: nil) - # Pass arguments to `get_data_agent` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.new - # - # # Call the get_data_agent method. - # result = client.get_data_agent request - # - # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent. - # p result - # - def get_data_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest - - # Converts hash and nil to 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_agent.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_agent.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.call_rpc :get_data_agent, 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 new DataAgent in a given project and location. - # - # @overload create_data_agent(request, options = nil) - # Pass arguments to `create_data_agent` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(parent: nil, data_agent_id: nil, data_agent: nil, request_id: nil) - # Pass arguments to `create_data_agent` via keyword arguments. Note that at - # least one keyword argument is 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. Value for parent. - # @param data_agent_id [::String] - # Optional. Id of the requesting object. Must be unique within the parent. - # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # If not provided, the server will auto-generate a value for the id. - # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new - # - # # Call the create_data_agent method. - # result = client.create_data_agent 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_data_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest - - # Converts hash and nil to 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_agent.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_agent.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.call_rpc :create_data_agent, 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 - - ## - # Updates the parameters of a single DataAgent. - # - # @overload update_data_agent(request, options = nil) - # Pass arguments to `update_data_agent` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(update_mask: nil, data_agent: nil, request_id: nil) - # Pass arguments to `update_data_agent` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # DataAgent resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields with non-default values - # present in the request will be overwritten. If a wildcard mask is provided, - # all fields will be overwritten. - # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new - # - # # Call the update_data_agent method. - # result = client.update_data_agent 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 update_data_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest - - # Converts hash and nil to 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_agent.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_agent&.name - header_params["data_agent.name"] = request.data_agent.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_agent.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.call_rpc :update_data_agent, 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 single DataAgent. - # - # @overload delete_data_agent(request, options = nil) - # Pass arguments to `delete_data_agent` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(name: nil, request_id: nil) - # Pass arguments to `delete_data_agent` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @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/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new - # - # # Call the delete_data_agent method. - # result = client.delete_data_agent request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest - - # Converts hash and nil to 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_agent.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_agent.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.call_rpc :delete_data_agent, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for DataAgent - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to 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_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_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_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.call_rpc :get_iam_policy, 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 - - ## - # Sets the IAM policy for a DataAgent. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.call_rpc :set_iam_policy, 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 DataAgentService API. - # - # This class represents the configuration for DataAgentService, - # 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::GeminiDataAnalytics::V1beta::DataAgentService::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_data_agents to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_agents.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_agents.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::GeminiDataAnalytics::V1beta::DataAgentService::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 = "geminidataanalytics.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 DataAgentService 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_data_agents` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_agents - ## - # RPC-specific configuration for `list_accessible_data_agents` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accessible_data_agents - ## - # RPC-specific configuration for `get_data_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_agent - ## - # RPC-specific configuration for `create_data_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_agent - ## - # RPC-specific configuration for `update_data_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_agent - ## - # RPC-specific configuration for `delete_data_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_agent - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - - # @private - def initialize parent_rpcs = nil - list_data_agents_config = parent_rpcs.list_data_agents if parent_rpcs.respond_to? :list_data_agents - @list_data_agents = ::Gapic::Config::Method.new list_data_agents_config - list_accessible_data_agents_config = parent_rpcs.list_accessible_data_agents if parent_rpcs.respond_to? :list_accessible_data_agents - @list_accessible_data_agents = ::Gapic::Config::Method.new list_accessible_data_agents_config - get_data_agent_config = parent_rpcs.get_data_agent if parent_rpcs.respond_to? :get_data_agent - @get_data_agent = ::Gapic::Config::Method.new get_data_agent_config - create_data_agent_config = parent_rpcs.create_data_agent if parent_rpcs.respond_to? :create_data_agent - @create_data_agent = ::Gapic::Config::Method.new create_data_agent_config - update_data_agent_config = parent_rpcs.update_data_agent if parent_rpcs.respond_to? :update_data_agent - @update_data_agent = ::Gapic::Config::Method.new update_data_agent_config - delete_data_agent_config = parent_rpcs.delete_data_agent if parent_rpcs.respond_to? :delete_data_agent - @delete_data_agent = ::Gapic::Config::Method.new delete_data_agent_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb deleted file mode 100644 index f3ca31d72405..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 GeminiDataAnalytics - module V1beta - module DataAgentService - # Credentials for the DataAgentService 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-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb deleted file mode 100644 index a34e1c89aa92..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 GeminiDataAnalytics - module V1beta - module DataAgentService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataAgentService 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 DataAgentService 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::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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::GeminiDataAnalytics::V1beta::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 = "geminidataanalytics.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-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb deleted file mode 100644 index ad362af7a503..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - module DataAgentService - # Path helper methods for the DataAgentService API. - module Paths - ## - # Create a fully-qualified DataAgent resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataAgents/{data_agent}` - # - # @param project [String] - # @param location [String] - # @param data_agent [String] - # - # @return [::String] - def data_agent_path project:, location:, data_agent: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataAgents/#{data_agent}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb deleted file mode 100644 index 9af7547b860e..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/gemini_data_analytics/v1beta/version" -require "google/cloud/gemini_data_analytics/v1beta/bindings_override" - -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/credentials" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/paths" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client" - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - ## - # Service describing handlers for resources. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest" - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - module DataAgentService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb deleted file mode 100644 index d7bef73846e7..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/client.rb +++ /dev/null @@ -1,1212 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_agent_service_pb" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - module DataAgentService - module Rest - ## - # REST client for the DataAgentService service. - # - # Service describing handlers for resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_agent_service_stub - - ## - # Configure the DataAgentService Client class. - # - # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataAgentService clients - # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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", "GeminiDataAnalytics", "V1beta"] - 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.timeout = 600.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataAgentService 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::GeminiDataAnalytics::V1beta::DataAgentService::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_agent_service_stub.universe_domain - end - - ## - # Create a new DataAgentService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataAgentService 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::GeminiDataAnalytics::V1beta::DataAgentService::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 - - @data_agent_service_stub = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_agent_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 - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_agent_service_stub.endpoint - config.universe_domain = @data_agent_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @data_agent_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_agent_service_stub.logger - end - - # Service calls - - ## - # Lists DataAgents in a given project and location. - # - # @overload list_data_agents(request, options = nil) - # Pass arguments to `list_data_agents` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil) - # Pass arguments to `list_data_agents` via keyword arguments. Note that at - # least one keyword argument is 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. Parent value for ListDataAgentsRequest. - # @param page_size [::Integer] - # Optional. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataAgents` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDataAgents` must - # match the call that provided the page token. The service may return fewer - # than this value. - # @param filter [::String] - # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for - # syntax. - # @param order_by [::String] - # Optional. User specification for how to order the results. - # @param show_deleted [::Boolean] - # Optional. If true, the list results will include soft-deleted DataAgents. - # Defaults to false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new - # - # # Call the list_data_agents method. - # result = client.list_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. - # p item - # end - # - def list_data_agents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest - - # Converts hash and nil to an 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_agents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_agents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_agents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.list_data_agents request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_agent_service_stub, :list_data_agents, "data_agents", 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 - - ## - # Lists DataAgents that are accessible to the caller in a given project and - # location. - # - # @overload list_accessible_data_agents(request, options = nil) - # Pass arguments to `list_accessible_data_agents` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_accessible_data_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil, creator_filter: nil) - # Pass arguments to `list_accessible_data_agents` via keyword arguments. Note that at - # least one keyword argument is 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. Parent value for ListAccessibleDataAgentsRequest. - # @param page_size [::Integer] - # Optional. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListAccessibleDataAgents` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessibleDataAgents` must match the call that provided the page - # token. The service may return fewer than this value. - # @param filter [::String] - # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for - # syntax. - # @param order_by [::String] - # Optional. User specification for how to order the results. - # @param show_deleted [::Boolean] - # Optional. If true, the list results will include soft-deleted DataAgents. - # Defaults to false. - # @param creator_filter [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest::CreatorFilter] - # Optional. Filter for the creator of the agent. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new - # - # # Call the list_accessible_data_agents method. - # result = client.list_accessible_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. - # p item - # end - # - def list_accessible_data_agents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest - - # Converts hash and nil to an 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_accessible_data_agents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_accessible_data_agents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_accessible_data_agents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.list_accessible_data_agents request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_agent_service_stub, :list_accessible_data_agents, "data_agents", 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 details of a single DataAgent. - # - # @overload get_data_agent(request, options = nil) - # Pass arguments to `get_data_agent` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(name: nil) - # Pass arguments to `get_data_agent` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.new - # - # # Call the get_data_agent method. - # result = client.get_data_agent request - # - # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent. - # p result - # - def get_data_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest - - # Converts hash and nil to an 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_agent.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_agent.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.get_data_agent 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 new DataAgent in a given project and location. - # - # @overload create_data_agent(request, options = nil) - # Pass arguments to `create_data_agent` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(parent: nil, data_agent_id: nil, data_agent: nil, request_id: nil) - # Pass arguments to `create_data_agent` via keyword arguments. Note that at - # least one keyword argument is 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. Value for parent. - # @param data_agent_id [::String] - # Optional. Id of the requesting object. Must be unique within the parent. - # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # If not provided, the server will auto-generate a value for the id. - # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent, ::Hash] - # Required. The resource being created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new - # - # # Call the create_data_agent method. - # result = client.create_data_agent 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_data_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest - - # Converts hash and nil to an 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_agent.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_agent.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.create_data_agent 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 - - ## - # Updates the parameters of a single DataAgent. - # - # @overload update_data_agent(request, options = nil) - # Pass arguments to `update_data_agent` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(update_mask: nil, data_agent: nil, request_id: nil) - # Pass arguments to `update_data_agent` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # DataAgent resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields with non-default values - # present in the request will be overwritten. If a wildcard mask is provided, - # all fields will be overwritten. - # @param data_agent [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent, ::Hash] - # Required. The resource being updated. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new - # - # # Call the update_data_agent method. - # result = client.update_data_agent 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 update_data_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest - - # Converts hash and nil to an 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_agent.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_agent.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.update_data_agent 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 single DataAgent. - # - # @overload delete_data_agent(request, options = nil) - # Pass arguments to `delete_data_agent` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_agent(name: nil, request_id: nil) - # Pass arguments to `delete_data_agent` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new - # - # # Call the delete_data_agent method. - # result = client.delete_data_agent request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_data_agent request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest - - # Converts hash and nil to an 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_agent.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_agent.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_agent.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.delete_data_agent request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the IAM policy for DataAgent - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash and nil to an 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_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.get_iam_policy 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 - - ## - # Sets the IAM policy for a DataAgent. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_agent_service_stub.set_iam_policy 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 DataAgentService REST API. - # - # This class represents the configuration for DataAgentService 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::GeminiDataAnalytics::V1beta::DataAgentService::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_data_agents to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_agents.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_agents.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 = "geminidataanalytics.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 - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, 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 DataAgentService 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_data_agents` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_agents - ## - # RPC-specific configuration for `list_accessible_data_agents` - # @return [::Gapic::Config::Method] - # - attr_reader :list_accessible_data_agents - ## - # RPC-specific configuration for `get_data_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_agent - ## - # RPC-specific configuration for `create_data_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_agent - ## - # RPC-specific configuration for `update_data_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_agent - ## - # RPC-specific configuration for `delete_data_agent` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_agent - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - - # @private - def initialize parent_rpcs = nil - list_data_agents_config = parent_rpcs.list_data_agents if parent_rpcs.respond_to? :list_data_agents - @list_data_agents = ::Gapic::Config::Method.new list_data_agents_config - list_accessible_data_agents_config = parent_rpcs.list_accessible_data_agents if parent_rpcs.respond_to? :list_accessible_data_agents - @list_accessible_data_agents = ::Gapic::Config::Method.new list_accessible_data_agents_config - get_data_agent_config = parent_rpcs.get_data_agent if parent_rpcs.respond_to? :get_data_agent - @get_data_agent = ::Gapic::Config::Method.new get_data_agent_config - create_data_agent_config = parent_rpcs.create_data_agent if parent_rpcs.respond_to? :create_data_agent - @create_data_agent = ::Gapic::Config::Method.new create_data_agent_config - update_data_agent_config = parent_rpcs.update_data_agent if parent_rpcs.respond_to? :update_data_agent - @update_data_agent = ::Gapic::Config::Method.new update_data_agent_config - delete_data_agent_config = parent_rpcs.delete_data_agent if parent_rpcs.respond_to? :delete_data_agent - @delete_data_agent = ::Gapic::Config::Method.new delete_data_agent_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb deleted file mode 100644 index b2f6b2a5e2ad..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 GeminiDataAnalytics - module V1beta - module DataAgentService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the DataAgentService 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 DataAgentService 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::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "geminidataanalytics.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: "/v1beta/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb deleted file mode 100644 index 0afe6184b86d..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest/service_stub.rb +++ /dev/null @@ -1,573 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_agent_service_pb" - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - module DataAgentService - module Rest - ## - # REST service stub for the DataAgentService 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 list_data_agents REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GeminiDataAnalytics::V1beta::ListDataAgentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse] - # A result object deserialized from the server's reply - def list_data_agents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_agents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_agents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse.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_accessible_data_agents REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse] - # A result object deserialized from the server's reply - def list_accessible_data_agents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_accessible_data_agents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_accessible_data_agents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse.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_agent REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GeminiDataAnalytics::V1beta::DataAgent] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] - # A result object deserialized from the server's reply - def get_data_agent request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_agent_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_agent", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent.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_agent REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_data_agent request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_agent_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_agent", - 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 update_data_agent REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 update_data_agent request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_agent_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_agent", - 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_data_agent REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_data_agent request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_agent_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_agent", - 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_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.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_data_agents REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest] - # 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_agents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/dataAgents", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_accessible_data_agents REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest] - # 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_accessible_data_agents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/dataAgents:listAccessible", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_agent REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest] - # 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_agent_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataAgents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_agent REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest] - # 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_agent_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/dataAgents", - body: "data_agent", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_agent REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest] - # 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_agent_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{data_agent.name}", - body: "data_agent", - matches: [ - ["data_agent.name", %r{^projects/[^/]+/locations/[^/]+/dataAgents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_agent REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest] - # 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_agent_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataAgents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # 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_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAgents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataAgents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb deleted file mode 100644 index 974e0861a933..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/gemini_data_analytics/v1beta/version" - -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/client" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest" - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - ## - # Service to ask a natural language question on top of BigQuery - # and Looker Studio datasources to get back streamed responses of various kinds - # to help provide a rich conversational answer. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/gemini_data_analytics/v1beta/data_chat_service" - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest" - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new - # - module DataChatService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_chat_service", "helpers.rb" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb deleted file mode 100644 index 849fd4bf566f..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/client.rb +++ /dev/null @@ -1,1147 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_chat_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - module DataChatService - ## - # Client for the DataChatService service. - # - # Service to ask a natural language question on top of BigQuery - # and Looker Studio datasources to get back streamed responses of various kinds - # to help provide a rich conversational answer. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_chat_service_stub - - ## - # Configure the DataChatService Client class. - # - # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataChatService clients - # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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", "GeminiDataAnalytics", "V1beta"] - 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.timeout = 600.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataChatService 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::GeminiDataAnalytics::V1beta::DataChatService::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_chat_service_stub.universe_domain - end - - ## - # Create a new DataChatService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataChatService 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/geminidataanalytics/v1beta/data_chat_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @data_chat_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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_chat_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 - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_chat_service_stub.endpoint - config.universe_domain = @data_chat_service_stub.universe_domain - config.logger = @data_chat_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_chat_service_stub.logger - end - - # Service calls - - ## - # Answers a data question by generating a stream of - # [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects. - # - # @overload chat(request, options = nil) - # Pass arguments to `chat` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload chat(inline_context: nil, conversation_reference: nil, data_agent_context: nil, client_managed_resource_context: nil, project: nil, parent: nil, messages: nil) - # Pass arguments to `chat` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param inline_context [::Google::Cloud::GeminiDataAnalytics::V1beta::Context, ::Hash] - # Optional. Inline context for the chat request. Use this to chat - # statelessly (without managed conversation persistence and without an - # Agent) by passing all context inline. - # - # Note: The following parameters are mutually exclusive: `inline_context`, `conversation_reference`, `data_agent_context`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param conversation_reference [::Google::Cloud::GeminiDataAnalytics::V1beta::ConversationReference, ::Hash] - # Optional. Reference to a persisted conversation and agent context. - # Use this to chat with an Agent using managed conversation persistence. - # - # Note: The following parameters are mutually exclusive: `conversation_reference`, `inline_context`, `data_agent_context`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param data_agent_context [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext, ::Hash] - # Optional. Context for the chat request. Use this to chat with an Agent - # statelessly, without managed conversation persistence. - # - # Note: The following parameters are mutually exclusive: `data_agent_context`, `inline_context`, `conversation_reference`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param client_managed_resource_context [::Google::Cloud::GeminiDataAnalytics::V1beta::ClientManagedResourceContext, ::Hash] - # Optional. Context with client managed resources. - # Some clients may not use GDA managed resources including - # conversations and agents, instead they create and manage their own - # conversations and agents resources. - # - # Note: The following parameters are mutually exclusive: `client_managed_resource_context`, `inline_context`, `conversation_reference`, `data_agent_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param project [::String] - # Optional. The Google Cloud project to be used for quota and billing. - # @param parent [::String] - # Required. The parent value for chat request. - # Pattern: `projects/{project}/locations/{location}` - # @param messages [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Message, ::Hash>] - # Required. Content of current conversation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Message>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Message>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new - # - # # Call the chat method to start streaming. - # output = client.chat request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::GeminiDataAnalytics::V1beta::Message - # output.each do |current_response| - # p current_response - # end - # - def chat request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.chat.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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.chat.timeout, - metadata: metadata, - retry_policy: @config.rpcs.chat.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.call_rpc :chat, 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 new conversation to persist the conversation history. Each - # conversation will have multiple messages associated with it. - # - # @overload create_conversation(request, options = nil) - # Pass arguments to `create_conversation` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_conversation(parent: nil, conversation_id: nil, conversation: nil, request_id: nil) - # Pass arguments to `create_conversation` via keyword arguments. Note that at - # least one keyword argument is 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. Parent value for CreateConversationRequest. - # Format: `projects/{project}/locations/{location}` - # @param conversation_id [::String] - # Optional. The conversation id of the conversation to create. - # Must be unique within the parent. - # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # If not provided, the server will auto-generate a value for the id. - # @param conversation [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation, ::Hash] - # Required. The conversation to create. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new - # - # # Call the create_conversation method. - # result = client.create_conversation request - # - # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. - # p result - # - def create_conversation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest - - # Converts hash and nil to 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_conversation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_conversation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_conversation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.call_rpc :create_conversation, 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 conversation. - # - # @overload delete_conversation(request, options = nil) - # Pass arguments to `delete_conversation` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_conversation(name: nil) - # Pass arguments to `delete_conversation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # Format: - # `projects/{project}/locations/{location}/conversations/{conversation}` - # - # @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/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new - # - # # Call the delete_conversation method. - # result = client.delete_conversation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest - - # Converts hash and nil to 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_conversation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_conversation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_conversation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.call_rpc :delete_conversation, 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 details of a single conversation by using conversation id and parent. - # - # @overload get_conversation(request, options = nil) - # Pass arguments to `get_conversation` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_conversation(name: nil) - # Pass arguments to `get_conversation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # Format: - # `projects/{project}/locations/{location}/conversations/{conversation}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new - # - # # Call the get_conversation method. - # result = client.get_conversation request - # - # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. - # p result - # - def get_conversation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest - - # Converts hash and nil to 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_conversation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_conversation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_conversation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.call_rpc :get_conversation, 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 conversations for a given parent. - # - # @overload list_conversations(request, options = nil) - # Pass arguments to `list_conversations` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_conversations` via keyword arguments. Note that at - # least one keyword argument is 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. Parent value for ListConversationsRequest. - # Format: `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. The max page size is 100. All larger page sizes will be coerced - # to 100. If unspecified, server will pick 50 as an approperiate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Returned conversations will match criteria specified within the - # filter. ListConversations allows filtering by: - # * agents - # * labels - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.new - # - # # Call the list_conversations method. - # result = client.list_conversations 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::GeminiDataAnalytics::V1beta::Conversation. - # p item - # end - # - def list_conversations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest - - # Converts hash and nil to 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_conversations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_conversations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_conversations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.call_rpc :list_conversations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_chat_service_stub, :list_conversations, 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 - - ## - # Lists all messages for a given conversation. - # - # @overload list_messages(request, options = nil) - # Pass arguments to `list_messages` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_messages(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_messages` via keyword arguments. Note that at - # least one keyword argument is 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 conversation to list messages under. - # Format: - # `projects/{project}/locations/{location}/conversations/{conversation_id}` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. The max page size is 100. All larger page sizes will be coerced - # to 100. If unspecified, server will pick 50 as an approperiate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for - # syntax. - # - # ListMessages allows filtering by: - # * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) - # * update_time - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.new - # - # # Call the list_messages method. - # result = client.list_messages 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::GeminiDataAnalytics::V1beta::StorageMessage. - # p item - # end - # - def list_messages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest - - # Converts hash and nil to 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_messages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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_messages.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_messages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.call_rpc :list_messages, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_chat_service_stub, :list_messages, 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 - - ## - # Queries data from a natural language user query. - # - # @overload query_data(request, options = nil) - # Pass arguments to `query_data` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload query_data(parent: nil, prompt: nil, context: nil, generation_options: nil) - # Pass arguments to `query_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource to generate the query for. - # Format: projects/\\{project}/locations/\\{location} - # @param prompt [::String] - # Required. The natural language query for which to generate query. - # Example: "What are the top 5 best selling products this month?" - # @param context [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataContext, ::Hash] - # Required. The context for the data query, including the data sources to - # use. - # @param generation_options [::Google::Cloud::GeminiDataAnalytics::V1beta::GenerationOptions, ::Hash] - # Optional. Options to control query generation and execution behavior. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new - # - # # Call the query_data method. - # result = client.query_data request - # - # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse. - # p result - # - def query_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.query_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION - metadata[:"x-goog-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.query_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.query_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.call_rpc :query_data, 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 DataChatService API. - # - # This class represents the configuration for DataChatService, - # 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::GeminiDataAnalytics::V1beta::DataChatService::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 - # # chat to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.chat.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.chat.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::GeminiDataAnalytics::V1beta::DataChatService::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 = "geminidataanalytics.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 DataChatService 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 `chat` - # @return [::Gapic::Config::Method] - # - attr_reader :chat - ## - # RPC-specific configuration for `create_conversation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversation - ## - # RPC-specific configuration for `delete_conversation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversation - ## - # RPC-specific configuration for `get_conversation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversation - ## - # RPC-specific configuration for `list_conversations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversations - ## - # RPC-specific configuration for `list_messages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_messages - ## - # RPC-specific configuration for `query_data` - # @return [::Gapic::Config::Method] - # - attr_reader :query_data - - # @private - def initialize parent_rpcs = nil - chat_config = parent_rpcs.chat if parent_rpcs.respond_to? :chat - @chat = ::Gapic::Config::Method.new chat_config - create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation - @create_conversation = ::Gapic::Config::Method.new create_conversation_config - delete_conversation_config = parent_rpcs.delete_conversation if parent_rpcs.respond_to? :delete_conversation - @delete_conversation = ::Gapic::Config::Method.new delete_conversation_config - get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation - @get_conversation = ::Gapic::Config::Method.new get_conversation_config - list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations - @list_conversations = ::Gapic::Config::Method.new list_conversations_config - list_messages_config = parent_rpcs.list_messages if parent_rpcs.respond_to? :list_messages - @list_messages = ::Gapic::Config::Method.new list_messages_config - query_data_config = parent_rpcs.query_data if parent_rpcs.respond_to? :query_data - @query_data = ::Gapic::Config::Method.new query_data_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb deleted file mode 100644 index 1b84d5caaf59..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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 GeminiDataAnalytics - module V1beta - module DataChatService - # Credentials for the DataChatService 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-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb deleted file mode 100644 index adbd4636c7a2..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - module DataChatService - # Path helper methods for the DataChatService API. - module Paths - ## - # Create a fully-qualified Conversation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/conversations/{conversation}` - # - # @param project [String] - # @param location [String] - # @param conversation [String] - # - # @return [::String] - def conversation_path project:, location:, conversation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/conversations/#{conversation}" - end - - ## - # Create a fully-qualified DataAgent resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataAgents/{data_agent}` - # - # @param project [String] - # @param location [String] - # @param data_agent [String] - # - # @return [::String] - def data_agent_path project:, location:, data_agent: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataAgents/#{data_agent}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb deleted file mode 100644 index 6d4c88e33b83..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/gemini_data_analytics/v1beta/version" -require "google/cloud/gemini_data_analytics/v1beta/bindings_override" - -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/credentials" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/paths" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client" - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - ## - # Service to ask a natural language question on top of BigQuery - # and Looker Studio datasources to get back streamed responses of various kinds - # to help provide a rich conversational answer. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest" - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new - # - module DataChatService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb deleted file mode 100644 index b4f9ee4a5dab..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/client.rb +++ /dev/null @@ -1,1065 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_chat_service_pb" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - module DataChatService - module Rest - ## - # REST client for the DataChatService service. - # - # Service to ask a natural language question on top of BigQuery - # and Looker Studio datasources to get back streamed responses of various kinds - # to help provide a rich conversational answer. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "geminidataanalytics.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_chat_service_stub - - ## - # Configure the DataChatService Client class. - # - # See {::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataChatService clients - # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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", "GeminiDataAnalytics", "V1beta"] - 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.timeout = 600.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataChatService 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::GeminiDataAnalytics::V1beta::DataChatService::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_chat_service_stub.universe_domain - end - - ## - # Create a new DataChatService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataChatService 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_chat_service_stub = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_chat_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 - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_chat_service_stub.endpoint - config.universe_domain = @data_chat_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @data_chat_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_chat_service_stub.logger - end - - # Service calls - - ## - # Answers a data question by generating a stream of - # [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects. - # - # @overload chat(request, options = nil) - # Pass arguments to `chat` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload chat(inline_context: nil, conversation_reference: nil, data_agent_context: nil, client_managed_resource_context: nil, project: nil, parent: nil, messages: nil) - # Pass arguments to `chat` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param inline_context [::Google::Cloud::GeminiDataAnalytics::V1beta::Context, ::Hash] - # Optional. Inline context for the chat request. Use this to chat - # statelessly (without managed conversation persistence and without an - # Agent) by passing all context inline. - # - # Note: The following parameters are mutually exclusive: `inline_context`, `conversation_reference`, `data_agent_context`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param conversation_reference [::Google::Cloud::GeminiDataAnalytics::V1beta::ConversationReference, ::Hash] - # Optional. Reference to a persisted conversation and agent context. - # Use this to chat with an Agent using managed conversation persistence. - # - # Note: The following parameters are mutually exclusive: `conversation_reference`, `inline_context`, `data_agent_context`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param data_agent_context [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext, ::Hash] - # Optional. Context for the chat request. Use this to chat with an Agent - # statelessly, without managed conversation persistence. - # - # Note: The following parameters are mutually exclusive: `data_agent_context`, `inline_context`, `conversation_reference`, `client_managed_resource_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param client_managed_resource_context [::Google::Cloud::GeminiDataAnalytics::V1beta::ClientManagedResourceContext, ::Hash] - # Optional. Context with client managed resources. - # Some clients may not use GDA managed resources including - # conversations and agents, instead they create and manage their own - # conversations and agents resources. - # - # Note: The following parameters are mutually exclusive: `client_managed_resource_context`, `inline_context`, `conversation_reference`, `data_agent_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param project [::String] - # Optional. The Google Cloud project to be used for quota and billing. - # @param parent [::String] - # Required. The parent value for chat request. - # Pattern: `projects/{project}/locations/{location}` - # @param messages [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Message, ::Hash>] - # Required. Content of current conversation. - # @return [::Enumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Message>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new - # - # # Call the chat method to start streaming. - # output = client.chat request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::GeminiDataAnalytics::V1beta::Message - # output.each do |current_response| - # p current_response - # end - # - def chat request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.chat.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.chat.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.chat.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - ::Gapic::Rest::ServerStream.new( - ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, - ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| - @data_chat_service_stub.chat request, options do |chunk| - in_q.deq - out_q.enq chunk - end - end - ) - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new conversation to persist the conversation history. Each - # conversation will have multiple messages associated with it. - # - # @overload create_conversation(request, options = nil) - # Pass arguments to `create_conversation` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_conversation(parent: nil, conversation_id: nil, conversation: nil, request_id: nil) - # Pass arguments to `create_conversation` via keyword arguments. Note that at - # least one keyword argument is 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. Parent value for CreateConversationRequest. - # Format: `projects/{project}/locations/{location}` - # @param conversation_id [::String] - # Optional. The conversation id of the conversation to create. - # Must be unique within the parent. - # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # If not provided, the server will auto-generate a value for the id. - # @param conversation [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation, ::Hash] - # Required. The conversation to create. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new - # - # # Call the create_conversation method. - # result = client.create_conversation request - # - # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. - # p result - # - def create_conversation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest - - # Converts hash and nil to an 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_conversation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_conversation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.create_conversation 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 conversation. - # - # @overload delete_conversation(request, options = nil) - # Pass arguments to `delete_conversation` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_conversation(name: nil) - # Pass arguments to `delete_conversation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # Format: - # `projects/{project}/locations/{location}/conversations/{conversation}` - # @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/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new - # - # # Call the delete_conversation method. - # result = client.delete_conversation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_conversation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest - - # Converts hash and nil to an 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_conversation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_conversation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.delete_conversation 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 details of a single conversation by using conversation id and parent. - # - # @overload get_conversation(request, options = nil) - # Pass arguments to `get_conversation` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_conversation(name: nil) - # Pass arguments to `get_conversation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # Format: - # `projects/{project}/locations/{location}/conversations/{conversation}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new - # - # # Call the get_conversation method. - # result = client.get_conversation request - # - # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. - # p result - # - def get_conversation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest - - # Converts hash and nil to an 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_conversation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_conversation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.get_conversation 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 conversations for a given parent. - # - # @overload list_conversations(request, options = nil) - # Pass arguments to `list_conversations` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_conversations` via keyword arguments. Note that at - # least one keyword argument is 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. Parent value for ListConversationsRequest. - # Format: `projects/{project}/locations/{location}` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. The max page size is 100. All larger page sizes will be coerced - # to 100. If unspecified, server will pick 50 as an approperiate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Returned conversations will match criteria specified within the - # filter. ListConversations allows filtering by: - # * agents - # * labels - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.new - # - # # Call the list_conversations method. - # result = client.list_conversations 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::GeminiDataAnalytics::V1beta::Conversation. - # p item - # end - # - def list_conversations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest - - # Converts hash and nil to an 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_conversations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_conversations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_conversations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.list_conversations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_chat_service_stub, :list_conversations, "conversations", 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 - - ## - # Lists all messages for a given conversation. - # - # @overload list_messages(request, options = nil) - # Pass arguments to `list_messages` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_messages(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_messages` via keyword arguments. Note that at - # least one keyword argument is 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 conversation to list messages under. - # Format: - # `projects/{project}/locations/{location}/conversations/{conversation_id}` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. The max page size is 100. All larger page sizes will be coerced - # to 100. If unspecified, server will pick 50 as an approperiate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for - # syntax. - # - # ListMessages allows filtering by: - # * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) - # * update_time - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.new - # - # # Call the list_messages method. - # result = client.list_messages 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::GeminiDataAnalytics::V1beta::StorageMessage. - # p item - # end - # - def list_messages request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest - - # Converts hash and nil to an 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_messages.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_messages.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_messages.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.list_messages request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_chat_service_stub, :list_messages, "messages", 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 - - ## - # Queries data from a natural language user query. - # - # @overload query_data(request, options = nil) - # Pass arguments to `query_data` via a request object, either of type - # {::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload query_data(parent: nil, prompt: nil, context: nil, generation_options: nil) - # Pass arguments to `query_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource to generate the query for. - # Format: projects/\\{project}/locations/\\{location} - # @param prompt [::String] - # Required. The natural language query for which to generate query. - # Example: "What are the top 5 best selling products this month?" - # @param context [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataContext, ::Hash] - # Required. The context for the data query, including the data sources to - # use. - # @param generation_options [::Google::Cloud::GeminiDataAnalytics::V1beta::GenerationOptions, ::Hash] - # Optional. Options to control query generation and execution behavior. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gemini_data_analytics/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new - # - # # Call the query_data method. - # result = client.query_data request - # - # # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse. - # p result - # - def query_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.query_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GeminiDataAnalytics::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.query_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.query_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_chat_service_stub.query_data 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 DataChatService REST API. - # - # This class represents the configuration for DataChatService 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::GeminiDataAnalytics::V1beta::DataChatService::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 - # # chat to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.chat.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.chat.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 = "geminidataanalytics.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 - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, 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 DataChatService 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 `chat` - # @return [::Gapic::Config::Method] - # - attr_reader :chat - ## - # RPC-specific configuration for `create_conversation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_conversation - ## - # RPC-specific configuration for `delete_conversation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_conversation - ## - # RPC-specific configuration for `get_conversation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_conversation - ## - # RPC-specific configuration for `list_conversations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_conversations - ## - # RPC-specific configuration for `list_messages` - # @return [::Gapic::Config::Method] - # - attr_reader :list_messages - ## - # RPC-specific configuration for `query_data` - # @return [::Gapic::Config::Method] - # - attr_reader :query_data - - # @private - def initialize parent_rpcs = nil - chat_config = parent_rpcs.chat if parent_rpcs.respond_to? :chat - @chat = ::Gapic::Config::Method.new chat_config - create_conversation_config = parent_rpcs.create_conversation if parent_rpcs.respond_to? :create_conversation - @create_conversation = ::Gapic::Config::Method.new create_conversation_config - delete_conversation_config = parent_rpcs.delete_conversation if parent_rpcs.respond_to? :delete_conversation - @delete_conversation = ::Gapic::Config::Method.new delete_conversation_config - get_conversation_config = parent_rpcs.get_conversation if parent_rpcs.respond_to? :get_conversation - @get_conversation = ::Gapic::Config::Method.new get_conversation_config - list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations - @list_conversations = ::Gapic::Config::Method.new list_conversations_config - list_messages_config = parent_rpcs.list_messages if parent_rpcs.respond_to? :list_messages - @list_messages = ::Gapic::Config::Method.new list_messages_config - query_data_config = parent_rpcs.query_data if parent_rpcs.respond_to? :query_data - @query_data = ::Gapic::Config::Method.new query_data_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb deleted file mode 100644 index bf05e97b4bee..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest/service_stub.rb +++ /dev/null @@ -1,505 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_chat_service_pb" - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - module DataChatService - module Rest - ## - # REST service stub for the DataChatService 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 chat REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yieldparam chunk [::String] The chunk of data received during server streaming. - # - # @return [::Gapic::Rest::TransportOperation] - def chat(request_pb, options = nil, &) - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_chat_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "chat", - options: options, - is_server_streaming: true, - & - ) - ::Gapic::Rest::TransportOperation.new response - end - - ## - # Baseline implementation for the create_conversation REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GeminiDataAnalytics::V1beta::Conversation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # A result object deserialized from the server's reply - def create_conversation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_conversation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_conversation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.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_conversation REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_conversation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_conversation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_conversation", - 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 get_conversation REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GeminiDataAnalytics::V1beta::Conversation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # A result object deserialized from the server's reply - def get_conversation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_conversation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_conversation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.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_conversations REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GeminiDataAnalytics::V1beta::ListConversationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse] - # A result object deserialized from the server's reply - def list_conversations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_conversations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_conversations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse.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_messages REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GeminiDataAnalytics::V1beta::ListMessagesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse] - # A result object deserialized from the server's reply - def list_messages request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_messages_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_messages", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the query_data REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::GeminiDataAnalytics::V1beta::QueryDataResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse] - # A result object deserialized from the server's reply - def query_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_query_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "query_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse.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 chat REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_chat_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}:chat", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_conversation REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest] - # 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_conversation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/conversations", - body: "conversation", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_conversation REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest] - # 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_conversation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_conversation REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest] - # 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_conversation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_conversations REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest] - # 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_conversations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/conversations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_messages REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest] - # 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_messages_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/messages", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/conversations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the query_data REST call - # - # @param request_pb [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_query_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}:queryData", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb deleted file mode 100644 index 90ac15f9c547..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/gemini_data_analytics/v1beta/data_agent_service/rest" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest" -require "google/cloud/gemini_data_analytics/v1beta/bindings_override" -require "google/cloud/gemini_data_analytics/v1beta/version" - -module Google - module Cloud - module GeminiDataAnalytics - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/gemini_data_analytics/v1beta/rest" - # client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new - # - module V1beta - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/version.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/version.rb deleted file mode 100644 index 664bc4354207..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/gemini_data_analytics/v1beta/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/agent_context_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/agent_context_pb.rb deleted file mode 100644 index d2772f18e68b..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/agent_context_pb.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/geminidataanalytics/v1beta/agent_context.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n;google/cloud/geminidataanalytics/v1beta/agent_context.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"4\n\x15\x41gentContextReference\x12\x1b\n\x0e\x63ontext_set_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\xa2\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x11\x41gentContextProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - AgentContextReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AgentContextReference").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb deleted file mode 100644 index 07f3032f172d..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/context_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/geminidataanalytics/v1beta/context.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/geminidataanalytics/v1beta/datasource_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n5google/cloud/geminidataanalytics/v1beta/context.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/datasource.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xd9\x08\n\x07\x43ontext\x12\x1f\n\x12system_instruction\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x15\x64\x61tasource_references\x18\x07 \x01(\x0b\x32=.google.cloud.geminidataanalytics.v1beta.DatasourceReferencesB\x03\xe0\x41\x02\x12R\n\x07options\x18\x03 \x01(\x0b\x32<.google.cloud.geminidataanalytics.v1beta.ConversationOptionsB\x03\xe0\x41\x01\x12S\n\x0f\x65xample_queries\x18\x05 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ExampleQueryB\x03\xe0\x41\x01\x12^\n\x15looker_golden_queries\x18\x0b \x03(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.LookerGoldenQueryB\x03\xe0\x41\x01\x12R\n\x0eglossary_terms\x18\x08 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.GlossaryTermB\x03\xe0\x41\x01\x12\x66\n\x14schema_relationships\x18\t \x03(\x0b\x32\x43.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationshipB\x03\xe0\x41\x01\x1a\x84\x04\n\x12SchemaRelationship\x12j\n\x11left_schema_paths\x18\x01 \x01(\x0b\x32O.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths\x12k\n\x12right_schema_paths\x18\x02 \x01(\x0b\x32O.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths\x12[\n\x07sources\x18\x03 \x03(\x0e\x32J.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.Source\x12\x18\n\x10\x63onfidence_score\x18\x04 \x01(\x02\x1a/\n\x0bSchemaPaths\x12\x11\n\ttable_fqn\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\"m\n\x06Source\x12\x16\n\x12SOURCE_UNSPECIFIED\x10\x00\x12\x18\n\x14\x42IGQUERY_JOB_HISTORY\x10\x01\x12\x11\n\rLLM_SUGGESTED\x10\x02\x12\x1e\n\x1a\x42IGQUERY_TABLE_CONSTRAINTS\x10\x03\"Y\n\x0c\x45xampleQuery\x12\x18\n\tsql_query\x18\x65 \x01(\tB\x03\xe0\x41\x01H\x00\x12&\n\x19natural_language_question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x07\n\x05query\"\x8d\x01\n\x11LookerGoldenQuery\x12\'\n\x1anatural_language_questions\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12O\n\x0clooker_query\x18\x05 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x03\xe0\x41\x01\"\x88\x02\n\x0bLookerQuery\x12\x12\n\x05model\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x65xplore\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ields\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12Q\n\x07\x66ilters\x18\x04 \x03(\x0b\x32;.google.cloud.geminidataanalytics.v1beta.LookerQuery.FilterB\x03\xe0\x41\x01\x12\x12\n\x05sorts\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x17\n\x05limit\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x1a\x30\n\x06\x46ilter\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\x08\n\x06_limit\"X\n\x0cGlossaryTerm\x12\x19\n\x0c\x64isplay_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06labels\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x86\x02\n\x13\x43onversationOptions\x12I\n\x05\x63hart\x18\x01 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ChartOptionsB\x03\xe0\x41\x01\x12O\n\x08\x61nalysis\x18\x02 \x01(\x0b\x32\x38.google.cloud.geminidataanalytics.v1beta.AnalysisOptionsB\x03\xe0\x41\x01\x12S\n\ndatasource\x18\x03 \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.DatasourceOptionsB\x03\xe0\x41\x01\"Y\n\x11\x44\x61tasourceOptions\x12\x44\n\x1a\x62ig_query_max_billed_bytes\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x03\xe0\x41\x01\"\xd6\x02\n\x0c\x43hartOptions\x12V\n\x05image\x18\x01 \x01(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptionsB\x03\xe0\x41\x01\x1a\xed\x01\n\x0cImageOptions\x12^\n\x08no_image\x18\x01 \x01(\x0b\x32J.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImageH\x00\x12\\\n\x03svg\x18\x02 \x01(\x0b\x32M.google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptionsH\x00\x1a\t\n\x07NoImage\x1a\x0c\n\nSvgOptionsB\x06\n\x04kind\"\x87\x01\n\x0f\x41nalysisOptions\x12T\n\x06python\x18\x01 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.AnalysisOptions.PythonB\x03\xe0\x41\x01\x1a\x1e\n\x06Python\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x42\x9d\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x0c\x43ontextProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.geminidataanalytics.v1beta.DatasourceReferences", "google/cloud/geminidataanalytics/v1beta/datasource.proto"], - ["google.protobuf.Int64Value", "google/protobuf/wrappers.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - Context = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context").msgclass - Context::SchemaRelationship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship").msgclass - Context::SchemaRelationship::SchemaPaths = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths").msgclass - Context::SchemaRelationship::Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.Source").enummodule - ExampleQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExampleQuery").msgclass - LookerGoldenQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery").msgclass - LookerQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerQuery").msgclass - LookerQuery::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter").msgclass - GlossaryTerm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.GlossaryTerm").msgclass - ConversationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ConversationOptions").msgclass - DatasourceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DatasourceOptions").msgclass - ChartOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions").msgclass - ChartOptions::ImageOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions").msgclass - ChartOptions::ImageOptions::NoImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.NoImage").msgclass - ChartOptions::ImageOptions::SvgOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartOptions.ImageOptions.SvgOptions").msgclass - AnalysisOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisOptions").msgclass - AnalysisOptions::Python = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisOptions.Python").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb deleted file mode 100644 index cf279d48f240..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/conversation_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/geminidataanalytics/v1beta/conversation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n:google/cloud/geminidataanalytics/v1beta/conversation.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x03\n\x0c\x43onversation\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x08\x12\x13\n\x06\x61gents\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\x37\n\x0elast_used_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12V\n\x06labels\x18\t \x03(\x0b\x32\x41.google.cloud.geminidataanalytics.v1beta.Conversation.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x98\x01\xea\x41\x94\x01\n/geminidataanalytics.googleapis.com/Conversation\x12\x44projects/{project}/locations/{location}/conversations/{conversation}*\rconversations2\x0c\x63onversation\"\xf5\x01\n\x19\x43reateConversationRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/geminidataanalytics.googleapis.com/Conversation\x12\x1c\n\x0f\x63onversation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12P\n\x0c\x63onversation\x18\x03 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ConversationB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"_\n\x16GetConversationRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/Conversation\"\xa9\x01\n\x18ListConversationsRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\x12/geminidataanalytics.googleapis.com/Conversation\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\"\x82\x01\n\x19ListConversationsResponse\x12L\n\rconversations\x18\x01 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.Conversation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x19\x44\x65leteConversationRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/ConversationB\xa2\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x11\x43onversationProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - Conversation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Conversation").msgclass - CreateConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.CreateConversationRequest").msgclass - GetConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.GetConversationRequest").msgclass - ListConversationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListConversationsRequest").msgclass - ListConversationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListConversationsResponse").msgclass - DeleteConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DeleteConversationRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/credentials_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/credentials_pb.rb deleted file mode 100644 index 12112d8f0b2c..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/credentials_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/geminidataanalytics/v1beta/credentials.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n9google/cloud/geminidataanalytics/v1beta/credentials.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"a\n\x0b\x43redentials\x12J\n\x05oauth\x18\x01 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.OAuthCredentialsH\x00\x42\x06\n\x04kind\"\xb6\x02\n\x10OAuthCredentials\x12W\n\x06secret\x18\x02 \x01(\x0b\x32\x45.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBasedH\x00\x12U\n\x05token\x18\x03 \x01(\x0b\x32\x44.google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBasedH\x00\x1a\x41\n\x0bSecretBased\x12\x16\n\tclient_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rclient_secret\x18\x03 \x01(\tB\x03\xe0\x41\x02\x1a\'\n\nTokenBased\x12\x19\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x06\n\x04kindB\xa1\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x10\x43redentialsProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - Credentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Credentials").msgclass - OAuthCredentials = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.OAuthCredentials").msgclass - OAuthCredentials::SecretBased = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.OAuthCredentials.SecretBased").msgclass - OAuthCredentials::TokenBased = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.OAuthCredentials.TokenBased").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb deleted file mode 100644 index b80b143685c0..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/geminidataanalytics/v1beta/data_agent.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n8google/cloud/geminidataanalytics/v1beta/data_agent.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x42google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa3\x05\n\tDataAgent\x12[\n\x14\x64\x61ta_analytics_agent\x18\x65 \x01(\x0b\x32;.google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgentH\x00\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x01\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x05 \x03(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.DataAgent.LabelsEntryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\npurge_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8a\x01\xea\x41\x86\x01\n,geminidataanalytics.googleapis.com/DataAgent\x12?projects/{project}/locations/{location}/dataAgents/{data_agent}*\ndataAgents2\tdataAgentB\x06\n\x04typeB\x9f\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x0e\x44\x61taAgentProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent", "google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - DataAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataAgent").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb deleted file mode 100644 index 23b106eb2d31..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_pb.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/geminidataanalytics/v1beta/data_agent_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/geminidataanalytics/v1beta/data_agent_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n@google/cloud/geminidataanalytics/v1beta/data_agent_service.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/data_agent.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\x01\n\x15ListDataAgentsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,geminidataanalytics.googleapis.com/DataAgent\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\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\x94\x01\n\x16ListDataAgentsResponse\x12G\n\x0b\x64\x61ta_agents\x18\x01 \x03(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataAgent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"\xb7\x03\n\x1fListAccessibleDataAgentsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,geminidataanalytics.googleapis.com/DataAgent\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\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12s\n\x0e\x63reator_filter\x18\x07 \x01(\x0e\x32V.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilterB\x03\xe0\x41\x01\"a\n\rCreatorFilter\x12\x1e\n\x1a\x43REATOR_FILTER_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x10\n\x0c\x43REATOR_ONLY\x10\x02\x12\x14\n\x10NOT_CREATOR_ONLY\x10\x03\"\x9e\x01\n ListAccessibleDataAgentsResponse\x12G\n\x0b\x64\x61ta_agents\x18\x01 \x03(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataAgent\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"Y\n\x13GetDataAgentRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,geminidataanalytics.googleapis.com/DataAgent\"\xe8\x01\n\x16\x43reateDataAgentRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,geminidataanalytics.googleapis.com/DataAgent\x12\x1a\n\rdata_agent_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\ndata_agent\x18\x03 \x01(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataAgentB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xbc\x01\n\x16UpdateDataAgentRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12K\n\ndata_agent\x18\x02 \x01(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataAgentB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"}\n\x16\x44\x65leteDataAgentRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,geminidataanalytics.googleapis.com/DataAgent\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xc3\x0e\n\x10\x44\x61taAgentService\x12\xd6\x01\n\x0eListDataAgents\x12>.google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest\x1a?.google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1beta/{parent=projects/*/locations/*}/dataAgents\x12\x83\x02\n\x18ListAccessibleDataAgents\x12H.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest\x1aI.google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta/{parent=projects/*/locations/*}/dataAgents:listAccessible\x12\xc3\x01\n\x0cGetDataAgent\x12<.google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest\x1a\x32.google.cloud.geminidataanalytics.v1beta.DataAgent\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1beta/{name=projects/*/locations/*/dataAgents/*}\x12\xfd\x01\n\x0f\x43reateDataAgent\x12?.google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1e\n\tDataAgent\x12\x11OperationMetadata\xda\x41\x1fparent,data_agent,data_agent_id\x82\xd3\xe4\x93\x02@\"2/v1beta/{parent=projects/*/locations/*}/dataAgents:\ndata_agent\x12\xff\x01\n\x0fUpdateDataAgent\x12?.google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41\x1e\n\tDataAgent\x12\x11OperationMetadata\xda\x41\x16\x64\x61ta_agent,update_mask\x82\xd3\xe4\x93\x02K2=/v1beta/{data_agent.name=projects/*/locations/*/dataAgents/*}:\ndata_agent\x12\xe1\x01\n\x0f\x44\x65leteDataAgent\x12?.google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1beta/{name=projects/*/locations/*/dataAgents/*}\x12\xa4\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Y\xda\x41\x08resource\x82\xd3\xe4\x93\x02H\"C/v1beta/{resource=projects/*/locations/*/dataAgents/*}:getIamPolicy:\x01*\x12\xa4\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Y\xda\x41\x08resource\x82\xd3\xe4\x93\x02H\"C/v1beta/{resource=projects/*/locations/*/dataAgents/*}:setIamPolicy:\x01*\x1aV\xca\x41\"geminidataanalytics.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa6\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x15\x44\x61taAgentServiceProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.geminidataanalytics.v1beta.DataAgent", "google/cloud/geminidataanalytics/v1beta/data_agent.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - ListDataAgentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListDataAgentsRequest").msgclass - ListDataAgentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListDataAgentsResponse").msgclass - ListAccessibleDataAgentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest").msgclass - ListAccessibleDataAgentsRequest::CreatorFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsRequest.CreatorFilter").enummodule - ListAccessibleDataAgentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListAccessibleDataAgentsResponse").msgclass - GetDataAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.GetDataAgentRequest").msgclass - CreateDataAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.CreateDataAgentRequest").msgclass - UpdateDataAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.UpdateDataAgentRequest").msgclass - DeleteDataAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DeleteDataAgentRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb deleted file mode 100644 index 25d720ede640..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb.rb +++ /dev/null @@ -1,60 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/geminidataanalytics/v1beta/data_agent_service.proto for package 'Google.Cloud.GeminiDataAnalytics.V1beta' -# 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/geminidataanalytics/v1beta/data_agent_service_pb' - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - module DataAgentService - # Service describing handlers for resources. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.geminidataanalytics.v1beta.DataAgentService' - - # Lists DataAgents in a given project and location. - rpc :ListDataAgents, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse - # Lists DataAgents that are accessible to the caller in a given project and - # location. - rpc :ListAccessibleDataAgents, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse - # Gets details of a single DataAgent. - rpc :GetDataAgent, ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent - # Creates a new DataAgent in a given project and location. - rpc :CreateDataAgent, ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single DataAgent. - rpc :UpdateDataAgent, ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest, ::Google::Longrunning::Operation - # Deletes a single DataAgent. - rpc :DeleteDataAgent, ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest, ::Google::Longrunning::Operation - # Gets the IAM policy for DataAgent - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the IAM policy for a DataAgent. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb.rb deleted file mode 100644 index 968364224f3a..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_analytics_agent_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/geminidataanalytics/v1beta/context_pb' - - -descriptor_data = "\nBgoogle/cloud/geminidataanalytics/v1beta/data_analytics_agent.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x35google/cloud/geminidataanalytics/v1beta/context.proto\"\x8d\x02\n\x12\x44\x61taAnalyticsAgent\x12N\n\x0fstaging_context\x18\x05 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x01\x12P\n\x11published_context\x18\x06 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x01\x12U\n\x16last_published_context\x18\x07 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x03\x42\xa8\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x17\x44\x61taAnalyticsAgentProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.geminidataanalytics.v1beta.Context", "google/cloud/geminidataanalytics/v1beta/context.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - DataAnalyticsAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataAnalyticsAgent").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb deleted file mode 100644 index 52eacbac70aa..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_pb.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/geminidataanalytics/v1beta/data_chat_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/geminidataanalytics/v1beta/context_pb' -require 'google/cloud/geminidataanalytics/v1beta/conversation_pb' -require 'google/cloud/geminidataanalytics/v1beta/credentials_pb' -require 'google/cloud/geminidataanalytics/v1beta/datasource_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n?google/cloud/geminidataanalytics/v1beta/data_chat_service.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/geminidataanalytics/v1beta/context.proto\x1a:google/cloud/geminidataanalytics/v1beta/conversation.proto\x1a\x39google/cloud/geminidataanalytics/v1beta/credentials.proto\x1a\x38google/cloud/geminidataanalytics/v1beta/datasource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x90\x02\n\x10QueryDataRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x13\n\x06prompt\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12O\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.QueryDataContextB\x03\xe0\x41\x02\x12[\n\x12generation_options\x18\x04 \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.GenerationOptionsB\x03\xe0\x41\x01\"\xb8\x01\n\x11GenerationOptions\x12\"\n\x15generate_query_result\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n generate_natural_language_answer\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12!\n\x14generate_explanation\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12-\n generate_disambiguation_question\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"u\n\x10QueryDataContext\x12\x61\n\x15\x64\x61tasource_references\x18\x01 \x01(\x0b\x32=.google.cloud.geminidataanalytics.v1beta.DatasourceReferencesB\x03\xe0\x41\x02\"\xde\x01\n\x11QueryDataResponse\x12\x17\n\x0fgenerated_query\x18\x01 \x01(\t\x12\x1a\n\x12intent_explanation\x18\x02 \x01(\t\x12R\n\x0cquery_result\x18\x03 \x01(\x0b\x32<.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult\x12\x1f\n\x17natural_language_answer\x18\x04 \x01(\t\x12\x1f\n\x17\x64isambiguation_question\x18\x05 \x03(\t\"\xa4\x03\n\x13\x45xecutedQueryResult\x12T\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x43.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column\x12N\n\x04rows\x18\x02 \x03(\x0b\x32@.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row\x12\x17\n\x0ftotal_row_count\x18\x03 \x01(\x03\x12\x16\n\x0epartial_result\x18\x04 \x01(\x08\x12\x1d\n\x15query_execution_error\x18\x05 \x01(\t\x1a$\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x1a\x16\n\x05Value\x12\r\n\x05value\x18\x01 \x01(\t\x1aY\n\x03Row\x12R\n\x06values\x18\x01 \x03(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value\"\xa4\x01\n\x13ListMessagesRequest\x12G\n\x06parent\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/Conversation\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"z\n\x14ListMessagesResponse\x12I\n\x08messages\x18\x01 \x03(\x0b\x32\x37.google.cloud.geminidataanalytics.v1beta.StorageMessage\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"g\n\x0eStorageMessage\x12\x12\n\nmessage_id\x18\x01 \x01(\t\x12\x41\n\x07message\x18\x02 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.Message\"\xd4\x04\n\x0b\x43hatRequest\x12O\n\x0einline_context\x18\x65 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x01H\x00\x12\x65\n\x16\x63onversation_reference\x18g \x01(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.ConversationReferenceB\x03\xe0\x41\x01H\x00\x12\\\n\x12\x64\x61ta_agent_context\x18h \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.DataAgentContextB\x03\xe0\x41\x01H\x00\x12u\n\x1f\x63lient_managed_resource_context\x18i \x01(\x0b\x32\x45.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContextB\x03\xe0\x41\x01H\x00\x12\x46\n\x07project\x18\x01 \x01(\tB5\x18\x01\xe0\x41\x01\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x08messages\x18\x02 \x03(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.MessageB\x03\xe0\x41\x02\x42\x12\n\x10\x63ontext_provider\"\xe3\x02\n\x10\x44\x61taAgentContext\x12H\n\ndata_agent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,geminidataanalytics.googleapis.com/DataAgent\x12N\n\x0b\x63redentials\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.CredentialsB\x03\xe0\x41\x01\x12\x66\n\x0f\x63ontext_version\x18\x03 \x01(\x0e\x32H.google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersionB\x03\xe0\x41\x01\"M\n\x0e\x43ontextVersion\x12\x1f\n\x1b\x43ONTEXT_VERSION_UNSPECIFIED\x10\x00\x12\x0b\n\x07STAGING\x10\x01\x12\r\n\tPUBLISHED\x10\x02\"\xc2\x01\n\x15\x43onversationReference\x12M\n\x0c\x63onversation\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/geminidataanalytics.googleapis.com/Conversation\x12Z\n\x12\x64\x61ta_agent_context\x18\x03 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.DataAgentContextB\x03\xe0\x41\x02\"\xa2\x01\n\x1c\x43lientManagedResourceContext\x12M\n\x0einline_context\x18\x01 \x01(\x0b\x32\x30.google.cloud.geminidataanalytics.v1beta.ContextB\x03\xe0\x41\x02\x12\x1c\n\x0f\x63onversation_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08\x61gent_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xfe\x01\n\x07Message\x12L\n\x0cuser_message\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.UserMessageH\x00\x12P\n\x0esystem_message\x18\x03 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.SystemMessageH\x00\x12\x32\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nmessage_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x06\n\x04kind\"%\n\x0bUserMessage\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\"\xc8\x04\n\rSystemMessage\x12\x44\n\x04text\x18\x01 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.TextMessageH\x00\x12H\n\x06schema\x18\x02 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.SchemaMessageH\x00\x12\x44\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.DataMessageH\x00\x12L\n\x08\x61nalysis\x18\x04 \x01(\x0b\x32\x38.google.cloud.geminidataanalytics.v1beta.AnalysisMessageH\x00\x12\x46\n\x05\x63hart\x18\x05 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ChartMessageH\x00\x12\x46\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ErrorMessageH\x00\x12W\n\x0f\x65xample_queries\x18\r \x01(\x0b\x32\x37.google.cloud.geminidataanalytics.v1beta.ExampleQueriesB\x03\xe0\x41\x01H\x00\x12\x15\n\x08group_id\x18\x0c \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04kindB\x0b\n\t_group_id\"\xce\x01\n\x0bTextMessage\x12\x12\n\x05parts\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12U\n\ttext_type\x18\x02 \x01(\x0e\x32=.google.cloud.geminidataanalytics.v1beta.TextMessage.TextTypeB\x03\xe0\x41\x01\"T\n\x08TextType\x12\x19\n\x15TEXT_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46INAL_RESPONSE\x10\x01\x12\x0b\n\x07THOUGHT\x10\x02\x12\x0c\n\x08PROGRESS\x10\x03\"\xa7\x01\n\rSchemaMessage\x12\x45\n\x05query\x18\x01 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.SchemaQueryH\x00\x12G\n\x06result\x18\x02 \x01(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.SchemaResultH\x00\x42\x06\n\x04kind\"$\n\x0bSchemaQuery\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\"]\n\x0cSchemaResult\x12M\n\x0b\x64\x61tasources\x18\x01 \x03(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DatasourceB\x03\xe0\x41\x01\"\xe5\x02\n\x0b\x44\x61taMessage\x12\x43\n\x05query\x18\x01 \x01(\x0b\x32\x32.google.cloud.geminidataanalytics.v1beta.DataQueryH\x00\x12\x17\n\rgenerated_sql\x18\x02 \x01(\tH\x00\x12\x45\n\x06result\x18\x03 \x01(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DataResultH\x00\x12Z\n\x16generated_looker_query\x18\x04 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x02\x18\x01H\x00\x12M\n\rbig_query_job\x18\x05 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.BigQueryJobH\x00\x42\x06\n\x04kind\"\xdf\x01\n\tDataQuery\x12K\n\x06looker\x18\x04 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.LookerQueryB\x03\xe0\x41\x01H\x00\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12M\n\x0b\x64\x61tasources\x18\x02 \x03(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DatasourceB\x03\xe0\x41\x01\x42\x0c\n\nquery_type\"\x91\x01\n\nDataResult\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x44\n\x06schema\x18\x05 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\x12*\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\xf9\x01\n\x0b\x42igQueryJob\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08location\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12_\n\x11\x64\x65stination_table\x18\x03 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferenceB\x03\xe0\x41\x01\x12\x44\n\x06schema\x18\x07 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\"\xb4\x01\n\x0f\x41nalysisMessage\x12G\n\x05query\x18\x01 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.AnalysisQueryH\x00\x12P\n\x0eprogress_event\x18\x02 \x01(\x0b\x32\x36.google.cloud.geminidataanalytics.v1beta.AnalysisEventH\x00\x42\x06\n\x04kind\"F\n\rAnalysisQuery\x12\x15\n\x08question\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x64\x61ta_result_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\xaa\x02\n\rAnalysisEvent\x12\x1b\n\x11planner_reasoning\x18\x02 \x01(\tH\x00\x12\x1b\n\x11\x63oder_instruction\x18\x03 \x01(\tH\x00\x12\x0e\n\x04\x63ode\x18\x04 \x01(\tH\x00\x12\x1a\n\x10\x65xecution_output\x18\x05 \x01(\tH\x00\x12\x19\n\x0f\x65xecution_error\x18\x06 \x01(\tH\x00\x12 \n\x16result_vega_chart_json\x18\x07 \x01(\tH\x00\x12!\n\x17result_natural_language\x18\x08 \x01(\tH\x00\x12\x19\n\x0fresult_csv_data\x18\t \x01(\tH\x00\x12\x1f\n\x15result_reference_data\x18\n \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x0b \x01(\tH\x00\x42\x06\n\x04kind\"\xa4\x01\n\x0c\x43hartMessage\x12\x44\n\x05query\x18\x01 \x01(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.ChartQueryH\x00\x12\x46\n\x06result\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.ChartResultH\x00\x42\x06\n\x04kind\"F\n\nChartQuery\x12\x19\n\x0cinstructions\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x61ta_result_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x0b\x43hartResult\x12\x31\n\x0bvega_config\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x41\n\x05image\x18\x03 \x01(\x0b\x32-.google.cloud.geminidataanalytics.v1beta.BlobB\x03\xe0\x41\x01\"!\n\x0c\x45rrorMessage\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x03\"e\n\x0e\x45xampleQueries\x12S\n\x0f\x65xample_queries\x18\x01 \x03(\x0b\x32\x35.google.cloud.geminidataanalytics.v1beta.ExampleQueryB\x03\xe0\x41\x01\"1\n\x04\x42lob\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x32\xae\x0c\n\x0f\x44\x61taChatService\x12\xa9\x01\n\x04\x43hat\x12\x34.google.cloud.geminidataanalytics.v1beta.ChatRequest\x1a\x30.google.cloud.geminidataanalytics.v1beta.Message\"7\x82\xd3\xe4\x93\x02\x31\",/v1beta/{parent=projects/*/locations/*}:chat:\x01*0\x01\x12\x82\x02\n\x12\x43reateConversation\x12\x42.google.cloud.geminidataanalytics.v1beta.CreateConversationRequest\x1a\x35.google.cloud.geminidataanalytics.v1beta.Conversation\"q\xda\x41#parent,conversation,conversation_id\x82\xd3\xe4\x93\x02\x45\"5/v1beta/{parent=projects/*/locations/*}/conversations:\x0c\x63onversation\x12\xb6\x01\n\x12\x44\x65leteConversation\x12\x42.google.cloud.geminidataanalytics.v1beta.DeleteConversationRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta/{name=projects/*/locations/*/conversations/*}\x12\xcf\x01\n\x0fGetConversation\x12?.google.cloud.geminidataanalytics.v1beta.GetConversationRequest\x1a\x35.google.cloud.geminidataanalytics.v1beta.Conversation\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/conversations/*}\x12\xe2\x01\n\x11ListConversations\x12\x41.google.cloud.geminidataanalytics.v1beta.ListConversationsRequest\x1a\x42.google.cloud.geminidataanalytics.v1beta.ListConversationsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*}/conversations\x12\xde\x01\n\x0cListMessages\x12<.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest\x1a=.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1beta/{parent=projects/*/locations/*/conversations/*}/messages\x12\xc0\x01\n\tQueryData\x12\x39.google.cloud.geminidataanalytics.v1beta.QueryDataRequest\x1a:.google.cloud.geminidataanalytics.v1beta.QueryDataResponse\"<\x82\xd3\xe4\x93\x02\x36\"1/v1beta/{parent=projects/*/locations/*}:queryData:\x01*\x1aV\xca\x41\"geminidataanalytics.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa5\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x14\x44\x61taChatServiceProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.geminidataanalytics.v1beta.DatasourceReferences", "google/cloud/geminidataanalytics/v1beta/datasource.proto"], - ["google.cloud.geminidataanalytics.v1beta.Context", "google/cloud/geminidataanalytics/v1beta/context.proto"], - ["google.cloud.geminidataanalytics.v1beta.Credentials", "google/cloud/geminidataanalytics/v1beta/credentials.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Struct", "google/protobuf/struct.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - QueryDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.QueryDataRequest").msgclass - GenerationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.GenerationOptions").msgclass - QueryDataContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.QueryDataContext").msgclass - QueryDataResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.QueryDataResponse").msgclass - ExecutedQueryResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult").msgclass - ExecutedQueryResult::Column = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column").msgclass - ExecutedQueryResult::Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value").msgclass - ExecutedQueryResult::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row").msgclass - ListMessagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListMessagesRequest").msgclass - ListMessagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ListMessagesResponse").msgclass - StorageMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.StorageMessage").msgclass - ChatRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChatRequest").msgclass - DataAgentContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataAgentContext").msgclass - DataAgentContext::ContextVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion").enummodule - ConversationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ConversationReference").msgclass - ClientManagedResourceContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext").msgclass - Message = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Message").msgclass - UserMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.UserMessage").msgclass - SystemMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SystemMessage").msgclass - TextMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.TextMessage").msgclass - TextMessage::TextType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.TextMessage.TextType").enummodule - SchemaMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SchemaMessage").msgclass - SchemaQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SchemaQuery").msgclass - SchemaResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SchemaResult").msgclass - DataMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataMessage").msgclass - DataQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataQuery").msgclass - DataResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataResult").msgclass - BigQueryJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.BigQueryJob").msgclass - AnalysisMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisMessage").msgclass - AnalysisQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisQuery").msgclass - AnalysisEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AnalysisEvent").msgclass - ChartMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartMessage").msgclass - ChartQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartQuery").msgclass - ChartResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ChartResult").msgclass - ErrorMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ErrorMessage").msgclass - ExampleQueries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.ExampleQueries").msgclass - Blob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Blob").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb deleted file mode 100644 index a5721a4a2fc6..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/data_chat_service_services_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/geminidataanalytics/v1beta/data_chat_service.proto for package 'Google.Cloud.GeminiDataAnalytics.V1beta' -# 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/geminidataanalytics/v1beta/data_chat_service_pb' - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - module DataChatService - # Service to ask a natural language question on top of BigQuery - # and Looker Studio datasources to get back streamed responses of various kinds - # to help provide a rich conversational answer. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.geminidataanalytics.v1beta.DataChatService' - - # Answers a data question by generating a stream of - # [Message][google.cloud.geminidataanalytics.v1alpha.Message] objects. - rpc :Chat, ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest, stream(::Google::Cloud::GeminiDataAnalytics::V1beta::Message) - # Creates a new conversation to persist the conversation history. Each - # conversation will have multiple messages associated with it. - rpc :CreateConversation, ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation - # Deletes a conversation. - rpc :DeleteConversation, ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest, ::Google::Protobuf::Empty - # Gets details of a single conversation by using conversation id and parent. - rpc :GetConversation, ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation - # Lists all conversations for a given parent. - rpc :ListConversations, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse - # Lists all messages for a given conversation. - rpc :ListMessages, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse - # Queries data from a natural language user query. - rpc :QueryData, ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest, ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb deleted file mode 100644 index 8c072f6d9654..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/lib/google/cloud/geminidataanalytics/v1beta/datasource_pb.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/geminidataanalytics/v1beta/datasource.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/geminidataanalytics/v1beta/agent_context_pb' -require 'google/cloud/geminidataanalytics/v1beta/credentials_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n8google/cloud/geminidataanalytics/v1beta/datasource.proto\x12\'google.cloud.geminidataanalytics.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a;google/cloud/geminidataanalytics/v1beta/agent_context.proto\x1a\x39google/cloud/geminidataanalytics/v1beta/credentials.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xa0\x04\n\x14\x44\x61tasourceReferences\x12N\n\x02\x62q\x18\x01 \x01(\x0b\x32@.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferencesH\x00\x12U\n\x06studio\x18\x02 \x01(\x0b\x32\x43.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferencesH\x00\x12R\n\x06looker\x18\x03 \x01(\x0b\x32@.google.cloud.geminidataanalytics.v1beta.LookerExploreReferencesH\x00\x12L\n\x07\x61lloydb\x18\x08 \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.AlloyDbReferenceH\x00\x12V\n\x11spanner_reference\x18\t \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.SpannerReferenceH\x00\x12Y\n\x13\x63loud_sql_reference\x18\n \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.CloudSqlReferenceH\x00\x42\x0c\n\nreferences\"y\n\x17\x42igQueryTableReferences\x12^\n\x10table_references\x18\x01 \x03(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferenceB\x03\xe0\x41\x01\"\xa7\x01\n\x16\x42igQueryTableReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ndataset_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08table_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x06schema\x18\x06 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\"{\n\x1aStudioDatasourceReferences\x12]\n\x11studio_references\x18\x02 \x03(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference\"7\n\x19StudioDatasourceReference\x12\x1a\n\rdatasource_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xdc\x01\n\x10\x41lloyDbReference\x12\x62\n\x12\x64\x61tabase_reference\x18\x01 \x01(\x0b\x32\x41.google.cloud.geminidataanalytics.v1beta.AlloyDbDatabaseReferenceB\x03\xe0\x41\x02\x12\x64\n\x17\x61gent_context_reference\x18\x03 \x01(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.AgentContextReferenceB\x03\xe0\x41\x01\"\xad\x01\n\x18\x41lloyDbDatabaseReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ncluster_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binstance_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\ttable_ids\x18\x06 \x03(\tB\x03\xe0\x41\x01\"\xdc\x01\n\x10SpannerReference\x12\x62\n\x12\x64\x61tabase_reference\x18\x01 \x01(\x0b\x32\x41.google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReferenceB\x03\xe0\x41\x02\x12\x64\n\x17\x61gent_context_reference\x18\x02 \x01(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.AgentContextReferenceB\x03\xe0\x41\x01\"\xb5\x02\n\x18SpannerDatabaseReference\x12]\n\x06\x65ngine\x18\x06 \x01(\x0e\x32H.google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReference.EngineB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binstance_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\ttable_ids\x18\x05 \x03(\tB\x03\xe0\x41\x01\"@\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\x0e\n\nGOOGLE_SQL\x10\x01\x12\x0e\n\nPOSTGRESQL\x10\x02\"\xde\x01\n\x11\x43loudSqlReference\x12\x63\n\x12\x64\x61tabase_reference\x18\x01 \x01(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.CloudSqlDatabaseReferenceB\x03\xe0\x41\x02\x12\x64\n\x17\x61gent_context_reference\x18\x02 \x01(\x0b\x32>.google.cloud.geminidataanalytics.v1beta.AgentContextReferenceB\x03\xe0\x41\x01\"\xb2\x02\n\x19\x43loudSqlDatabaseReference\x12^\n\x06\x65ngine\x18\x01 \x01(\x0e\x32I.google.cloud.geminidataanalytics.v1beta.CloudSqlDatabaseReference.EngineB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06region\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0binstance_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\ttable_ids\x18\x07 \x03(\tB\x03\xe0\x41\x01\";\n\x06\x45ngine\x12\x16\n\x12\x45NGINE_UNSPECIFIED\x10\x00\x12\x0e\n\nPOSTGRESQL\x10\x01\x12\t\n\x05MYSQL\x10\x02\"\xcb\x01\n\x17LookerExploreReferences\x12`\n\x12\x65xplore_references\x18\x01 \x03(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.LookerExploreReferenceB\x03\xe0\x41\x02\x12N\n\x0b\x63redentials\x18\x02 \x01(\x0b\x32\x34.google.cloud.geminidataanalytics.v1beta.CredentialsB\x03\xe0\x41\x01\"\xa6\x02\n\x16LookerExploreReference\x12\x1d\n\x13looker_instance_uri\x18\t \x01(\tH\x00\x12j\n\x1cprivate_looker_instance_info\x18\n \x01(\x0b\x32\x42.google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfoH\x00\x12\x19\n\x0clookml_model\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x65xplore\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x06schema\x18\x08 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\x42\n\n\x08instance\"W\n\x19PrivateLookerInstanceInfo\x12\x1a\n\x12looker_instance_id\x18\x01 \x01(\t\x12\x1e\n\x16service_directory_name\x18\x02 \x01(\t\"\x8a\x05\n\nDatasource\x12\x63\n\x18\x62igquery_table_reference\x18\x01 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.BigQueryTableReferenceH\x00\x12\x1e\n\x14studio_datasource_id\x18\x02 \x01(\tH\x00\x12\x63\n\x18looker_explore_reference\x18\x04 \x01(\x0b\x32?.google.cloud.geminidataanalytics.v1beta.LookerExploreReferenceH\x00\x12W\n\x12\x61lloy_db_reference\x18\x0c \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.AlloyDbReferenceH\x00\x12V\n\x11spanner_reference\x18\r \x01(\x0b\x32\x39.google.cloud.geminidataanalytics.v1beta.SpannerReferenceH\x00\x12Y\n\x13\x63loud_sql_reference\x18\x0e \x01(\x0b\x32:.google.cloud.geminidataanalytics.v1beta.CloudSqlReferenceH\x00\x12\x44\n\x06schema\x18\x07 \x01(\x0b\x32/.google.cloud.geminidataanalytics.v1beta.SchemaB\x03\xe0\x41\x01\x12\x33\n\rstruct_schema\x18\n \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x42\x0b\n\treference\"\xf7\x01\n\x06Schema\x12\x43\n\x06\x66ields\x18\x01 \x03(\x0b\x32..google.cloud.geminidataanalytics.v1beta.FieldB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08synonyms\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12I\n\x07\x66ilters\x18\x06 \x03(\x0b\x32\x33.google.cloud.geminidataanalytics.v1beta.DataFilterB\x03\xe0\x41\x01\"\x99\x02\n\x05\x46ield\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04mode\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08synonyms\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\tsubfields\x18\t \x03(\x0b\x32..google.cloud.geminidataanalytics.v1beta.FieldB\x03\xe0\x41\x01\x12\x15\n\x08\x63\x61tegory\x18\n \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cvalue_format\x18\x0b \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\nDataFilter\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12J\n\x04type\x18\x03 \x01(\x0e\x32\x37.google.cloud.geminidataanalytics.v1beta.DataFilterTypeB\x03\xe0\x41\x01*E\n\x0e\x44\x61taFilterType\x12 \n\x1c\x44\x41TA_FILTER_TYPE_UNSPECIFIED\x10\x00\x12\x11\n\rALWAYS_FILTER\x10\x01\x42\xa0\x02\n+com.google.cloud.geminidataanalytics.v1betaB\x0f\x44\x61tasourceProtoP\x01Z]cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb\xaa\x02\'Google.Cloud.GeminiDataAnalytics.V1Beta\xca\x02\'Google\\Cloud\\GeminiDataAnalytics\\V1beta\xea\x02*Google::Cloud::GeminiDataAnalytics::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.geminidataanalytics.v1beta.AgentContextReference", "google/cloud/geminidataanalytics/v1beta/agent_context.proto"], - ["google.cloud.geminidataanalytics.v1beta.Credentials", "google/cloud/geminidataanalytics/v1beta/credentials.proto"], - ["google.protobuf.Struct", "google/protobuf/struct.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GeminiDataAnalytics - module V1beta - DatasourceReferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DatasourceReferences").msgclass - BigQueryTableReferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.BigQueryTableReferences").msgclass - BigQueryTableReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.BigQueryTableReference").msgclass - StudioDatasourceReferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.StudioDatasourceReferences").msgclass - StudioDatasourceReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.StudioDatasourceReference").msgclass - AlloyDbReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AlloyDbReference").msgclass - AlloyDbDatabaseReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.AlloyDbDatabaseReference").msgclass - SpannerReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SpannerReference").msgclass - SpannerDatabaseReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReference").msgclass - SpannerDatabaseReference::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReference.Engine").enummodule - CloudSqlReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.CloudSqlReference").msgclass - CloudSqlDatabaseReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.CloudSqlDatabaseReference").msgclass - CloudSqlDatabaseReference::Engine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.CloudSqlDatabaseReference.Engine").enummodule - LookerExploreReferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerExploreReferences").msgclass - LookerExploreReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.LookerExploreReference").msgclass - PrivateLookerInstanceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.PrivateLookerInstanceInfo").msgclass - Datasource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Datasource").msgclass - Schema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Schema").msgclass - Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.Field").msgclass - DataFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataFilter").msgclass - DataFilterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.geminidataanalytics.v1beta.DataFilterType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/README.md deleted file mode 100644 index de4bd2577d46..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Data Analytics API with Gemini V1BETA 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-gemini_data_analytics-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index c6b6b60729c9..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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. - 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: - # 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. - 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. - # - # 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 - 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. - # @!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 - - # 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 - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index fb9115c630af..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_info.rb deleted file mode 100644 index cea53f02d1a8..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index b836bdb60b21..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 71b994c7ef20..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/agent_context.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/agent_context.rb deleted file mode 100644 index a978fc8f6913..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/agent_context.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - # Message representing a reference to Agent Context. - # @!attribute [rw] context_set_id - # @return [::String] - # Required. Context set ID to retrieve. - class AgentContextReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb deleted file mode 100644 index d2999b2a3911..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/context.rb +++ /dev/null @@ -1,291 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - # A collection of context to apply to this conversation - # @!attribute [rw] system_instruction - # @return [::String] - # Optional. The basic entry point for data owners creating domain knowledge - # for Agent. - # - # Why: Business jargon (e.g., YTD revenue is calculated as…, Retirement Age - # is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate) - # can help the model understand the business context around a user question. - # @!attribute [rw] datasource_references - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DatasourceReferences] - # Required. Data sources that are available for answering the question. - # @!attribute [rw] options - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ConversationOptions] - # Optional. Additional options for the conversation. - # @!attribute [rw] example_queries - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::ExampleQuery>] - # Optional. A list of example queries, providing examples of relevant and - # commonly used SQL queries and their corresponding natural language queries - # optionally present. Currently only used for BigQuery data sources. - # @!attribute [rw] looker_golden_queries - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::LookerGoldenQuery>] - # Optional. A list of golden queries, providing examples of relevant and - # commonly used Looker queries and their corresponding natural language - # queries optionally present. - # @!attribute [rw] glossary_terms - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::GlossaryTerm>] - # Optional. Term definitions (currently, only user authored) - # @!attribute [rw] schema_relationships - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Context::SchemaRelationship>] - # Optional. Relationships between table schema, including referencing and - # referenced columns. - class Context - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The relationship between two tables, including referencing and referenced - # columns. This is a derived context retrieved from Dataplex Dataset - # Insights. - # @!attribute [rw] left_schema_paths - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context::SchemaRelationship::SchemaPaths] - # An ordered list of fields for the join from the first table. - # The size of this list must be the same as `right_schema_paths`. - # Each field at index i in this list must correspond to a field at the same - # index in the `right_schema_paths` list. - # @!attribute [rw] right_schema_paths - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context::SchemaRelationship::SchemaPaths] - # An ordered list of fields for the join from the second table. - # The size of this list must be the same as `left_schema_paths`. - # Each field at index i in this list must correspond to a field at the same - # index in the `left_schema_paths` list. - # @!attribute [rw] sources - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Context::SchemaRelationship::Source>] - # Sources which generated the schema relation edge. - # @!attribute [rw] confidence_score - # @return [::Float] - # A confidence score for the suggested relationship. - # Manually added edges have the highest confidence score. - class SchemaRelationship - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents an ordered set of paths within the table schema. - # @!attribute [rw] table_fqn - # @return [::String] - # The service-qualified full resource name of the table - # Ex: - # bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - # @!attribute [rw] paths - # @return [::Array<::String>] - # The ordered list of paths within the table schema. - class SchemaPaths - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Source which generated the schema relation edge. - module Source - # The source of the schema relationship is unspecified. - SOURCE_UNSPECIFIED = 0 - - # The source of the schema relationship is BigQuery job history. - BIGQUERY_JOB_HISTORY = 1 - - # The source of the schema relationship is LLM suggested. - LLM_SUGGESTED = 2 - - # The source of the schema relationship is BigQuery table constraints. - BIGQUERY_TABLE_CONSTRAINTS = 3 - end - end - end - - # Example of relevant and commonly used SQL query and its corresponding natural - # language queries optionally present. Currently only used for BigQuery data - # sources. - # @!attribute [rw] sql_query - # @return [::String] - # Optional. The SQL query that should be generated to answer the natural - # language question. For example: "SELECT COUNT(*) FROM orders WHERE - # order_date BETWEEN '2024-01-01' AND '2024-01-31'" - # @!attribute [rw] natural_language_question - # @return [::String] - # Optional. A natural language question that a user might ask. - # For example: "How many orders were placed last month?" - class ExampleQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A golden query for Looker, including natural language questions and a - # corresponding Looker Query. Analogous to ExampleQuery. - # @!attribute [rw] natural_language_questions - # @return [::Array<::String>] - # Optional. Natural language questions that a user might ask. - # For example: "How many orders were placed last month?" - # @!attribute [rw] looker_query - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery] - # Optional. The Looker Query corresponding to the natural language questions. - class LookerGoldenQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Looker Query Object - # [Looker API - # documentation](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query). - # @!attribute [rw] model - # @return [::String] - # Required. The LookML model used to generate the query. - # @!attribute [rw] explore - # @return [::String] - # Required. The LookML explore used to generate the query. - # @!attribute [rw] fields - # @return [::Array<::String>] - # Optional. The fields to retrieve from the explore. - # @!attribute [rw] filters - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery::Filter>] - # Optional. The filters to apply to the explore. - # @!attribute [rw] sorts - # @return [::Array<::String>] - # Optional. The sorts to apply to the explore. - # @!attribute [rw] limit - # @return [::String] - # Optional. Limit in the query. - class LookerQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A Looker query filter. - # @!attribute [rw] field - # @return [::String] - # Required. The field to filter on. - # @!attribute [rw] value - # @return [::String] - # Required. The value for the field to filter on. - class Filter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Definition of a term within a specific domain. - # @!attribute [rw] display_name - # @return [::String] - # Required. User friendly display name of the glossary term being defined. - # For example: "CTR", "conversion rate", "pending" - # @!attribute [rw] description - # @return [::String] - # Required. The description or meaning of the term. - # For example: "Click-through rate", "The percentage of users who complete a - # desired action", "An order that is waiting to be processed." - # @!attribute [rw] labels - # @return [::Array<::String>] - # Optional. A list of general purpose labels associated to this term. - # For example: ["click rate", "clickthrough", "waiting"] - class GlossaryTerm - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options for the conversation. - # @!attribute [rw] chart - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartOptions] - # Optional. Options for chart generation. - # @!attribute [rw] analysis - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AnalysisOptions] - # Optional. Options for analysis. - # @!attribute [rw] datasource - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DatasourceOptions] - # Optional. Options for datasources. - class ConversationOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options for datasources configurations. - # @!attribute [rw] big_query_max_billed_bytes - # @return [::Google::Protobuf::Int64Value] - # Optional. This option applies to datasources that require BigQuery queries - # only. Limits the bytes billed for each BQ query job. Queries that will have - # bytes billed beyond this limit will fail (without incurring a charge). - # If unspecified, no limit will be applied. - class DatasourceOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options for chart generation. - # @!attribute [rw] image - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartOptions::ImageOptions] - # Optional. When specified, the agent will render generated charts using the - # provided format. Defaults to no image. - class ChartOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Options for rendering images of generated charts. - # @!attribute [rw] no_image - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartOptions::ImageOptions::NoImage] - # No image. - # - # Note: The following fields are mutually exclusive: `no_image`, `svg`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] svg - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartOptions::ImageOptions::SvgOptions] - # SVG format. - # - # Note: The following fields are mutually exclusive: `svg`, `no_image`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ImageOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # No image. - class NoImage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # SVG options. - class SvgOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Options for analysis. - # @!attribute [rw] python - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AnalysisOptions::Python] - # Optional. Options for Python analysis. - class AnalysisOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Options for Python analysis. - # @!attribute [rw] enabled - # @return [::Boolean] - # Optional. Whether to enable Python analysis. - # Defaults to false. - class Python - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb deleted file mode 100644 index 6d7dd3768eee..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/conversation.rb +++ /dev/null @@ -1,155 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - # Message for a conversation. - # @!attribute [rw] name - # @return [::String] - # Optional. Identifier. The unique resource name of a conversation. Format: - # `projects/{project}/locations/{location}/conversations/{conversation_id}` - # `{conversation_id}` is the resource id and should be 63 characters or less - # and must match the format described in - # https://google.aip.dev/122#resource-id-segments - # - # Example: - # `projects/1234567890/locations/global/conversations/my-conversation`. - # - # It is recommended to skip setting this field during conversation creation - # as it will be inferred automatically and overwritten with the - # \\{parent}/conversations/\\{conversation_id}. - # @!attribute [rw] agents - # @return [::Array<::String>] - # Required. Agent(s) in the conversation. - # Currently, only one agent is supported. This field is repeated to allow - # for future support of multiple agents in a conversation. - # Format: `projects/{project}/locations/{location}/dataAgents/{agent}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] last_used_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the last used conversation. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Open-ended and user-defined labels that can be set by the client - # to tag a conversation (e.g. to filter conversations for specific - # surfaces/products). - class Conversation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request for creating a conversation. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for CreateConversationRequest. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] conversation_id - # @return [::String] - # Optional. The conversation id of the conversation to create. - # Must be unique within the parent. - # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # If not provided, the server will auto-generate a value for the id. - # @!attribute [rw] conversation - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation] - # Required. The conversation to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - class CreateConversationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting a conversation based on parent and conversation id. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # Format: - # `projects/{project}/locations/{location}/conversations/{conversation}` - class GetConversationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for listing conversations based on parent. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListConversationsRequest. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. The max page size is 100. All larger page sizes will be coerced - # to 100. If unspecified, server will pick 50 as an approperiate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Returned conversations will match criteria specified within the - # filter. ListConversations allows filtering by: - # * agents - # * labels - class ListConversationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing conversations. - # @!attribute [rw] conversations - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation>] - # The list of conversations. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListConversationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a conversation based on parent and conversation id. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # Format: - # `projects/{project}/locations/{location}/conversations/{conversation}` - class DeleteConversationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb deleted file mode 100644 index 7807be268656..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/credentials.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - # Represents different forms of credential specification. - # @!attribute [rw] oauth - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::OAuthCredentials] - # OAuth credentials. - class Credentials - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents OAuth credentials. - # @!attribute [rw] secret - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::OAuthCredentials::SecretBased] - # Secret-based OAuth credentials. - # - # Note: The following fields are mutually exclusive: `secret`, `token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] token - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::OAuthCredentials::TokenBased] - # Token-based OAuth credentials. - # - # Note: The following fields are mutually exclusive: `token`, `secret`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class OAuthCredentials - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The name of the secret containing the access token. - # Represents secret-based OAuth credentials. - # @!attribute [rw] client_id - # @return [::String] - # Required. An OAuth client ID. - # @!attribute [rw] client_secret - # @return [::String] - # Required. An OAuth client secret. - class SecretBased - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Read more about Looker access tokens here: - # https://developers.looker.com/api/advanced-usage/looker-api-oauth - # @!attribute [rw] access_token - # @return [::String] - # Required. The name of the secret containing the access token. - class TokenBased - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb deleted file mode 100644 index 464a1173a44c..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent.rb +++ /dev/null @@ -1,90 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - # Message describing a DataAgent object. - # @!attribute [rw] data_analytics_agent - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAnalyticsAgent] - # Data analytics agent. - # @!attribute [rw] name - # @return [::String] - # Optional. Identifier. The unique resource name of a DataAgent. - # Format: - # `projects/{project}/locations/{location}/dataAgents/{data_agent_id}` - # `{data_agent}` is the resource id and should be 63 characters or less and - # must match the format described in - # https://google.aip.dev/122#resource-id-segments - # - # Example: `projects/1234567890/locations/global/dataAgents/my-agent`. - # - # It is recommended to skip setting this field during agent creation as it - # will be inferred automatically and overwritten with the - # \\{parent}/dataAgents/\\{data_agent_id}. - # @!attribute [rw] display_name - # @return [::String] - # Optional. User friendly display name. - # - # * Must be between 1-256 characters. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the agent. - # - # * Must be between 1-1024 characters. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels to help users filter related agents. - # For example, "sales", "business", "etl", and so on. - # Note labels are used only for filtering and not for policies. - # See the [labels - # documentation](https://cloud.google.com/resource-manager/docs/labels-overview) - # for more details on label usage. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the data agent was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the data agent was last updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. [Output only] The time the data agent was soft deleted. - # @!attribute [r] purge_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp in UTC of when this data agent is considered - # expired. This is *always* provided on output, regardless of what was sent - # on input. - class DataAgent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb deleted file mode 100644 index e2e7c89541d5..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_agent_service.rb +++ /dev/null @@ -1,267 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - # Message for requesting list of DataAgents. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListDataAgentsRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDataAgents` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDataAgents` must - # match the call that provided the page token. The service may return fewer - # than this value. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for - # syntax. - # @!attribute [rw] order_by - # @return [::String] - # Optional. User specification for how to order the results. - # @!attribute [rw] show_deleted - # @return [::Boolean] - # Optional. If true, the list results will include soft-deleted DataAgents. - # Defaults to false. - class ListDataAgentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing DataAgents. - # @!attribute [rw] data_agents - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] - # The list of DataAgent. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token or empty if none. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Locations that could not be reached. - class ListDataAgentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of accessible DataAgents. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListAccessibleDataAgentsRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Server may return fewer items than requested. - # If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListAccessibleDataAgents` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListAccessibleDataAgents` must match the call that provided the page - # token. The service may return fewer than this value. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for - # syntax. - # @!attribute [rw] order_by - # @return [::String] - # Optional. User specification for how to order the results. - # @!attribute [rw] show_deleted - # @return [::Boolean] - # Optional. If true, the list results will include soft-deleted DataAgents. - # Defaults to false. - # @!attribute [rw] creator_filter - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest::CreatorFilter] - # Optional. Filter for the creator of the agent. - class ListAccessibleDataAgentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Filter for the creator of the agent. - module CreatorFilter - # Default value. - CREATOR_FILTER_UNSPECIFIED = 0 - - # No creator-specific filter will be applied. All agents will be returned. - NONE = 1 - - # Only agents created by the user calling the API will be returned. - CREATOR_ONLY = 2 - - # Only agents not created by the user calling the API will be returned. - NOT_CREATOR_ONLY = 3 - end - end - - # Message for response to listing accessible DataAgents. - # @!attribute [rw] data_agents - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>] - # The list of accessible DataAgent. - # @!attribute [rw] next_page_token - # @return [::String] - # The next page token or empty if none. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Locations that could not be reached. - class ListAccessibleDataAgentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a DataAgent. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetDataAgentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a DataAgent. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] data_agent_id - # @return [::String] - # Optional. Id of the requesting object. Must be unique within the parent. - # The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # If not provided, the server will auto-generate a value for the id. - # @!attribute [rw] data_agent - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] - # Required. The resource being created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateDataAgentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a DataAgent. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # DataAgent resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields with non-default values - # present in the request will be overwritten. If a wildcard mask is provided, - # all fields will be overwritten. - # @!attribute [rw] data_agent - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent] - # Required. The resource being updated. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateDataAgentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a DataAgent. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteDataAgentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have been cancelled successfully - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb deleted file mode 100644 index a57d8a3d9984..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_analytics_agent.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - # Message describing a DataAnalyticsAgent object. - # @!attribute [rw] staging_context - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context] - # Optional. The staging context for the agent. - # This context is used to test and validate changes before publishing. - # @!attribute [rw] published_context - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context] - # Optional. The published context for the agent. - # This context is used by the Chat API in production. - # @!attribute [r] last_published_context - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context] - # Output only. The last published context for the agent. - # This is an output-only field populated by the system when the - # published context is updated. It is used to restore the agent to a - # previous state. - class DataAnalyticsAgent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb deleted file mode 100644 index 175e661f19e1..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/data_chat_service.rb +++ /dev/null @@ -1,764 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - # Request to query data from a natural language query. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource to generate the query for. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] prompt - # @return [::String] - # Required. The natural language query for which to generate query. - # Example: "What are the top 5 best selling products this month?" - # @!attribute [rw] context - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataContext] - # Required. The context for the data query, including the data sources to - # use. - # @!attribute [rw] generation_options - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::GenerationOptions] - # Optional. Options to control query generation and execution behavior. - class QueryDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options to control query generation, execution, and response format. - # @!attribute [rw] generate_query_result - # @return [::Boolean] - # Optional. If true, the generated query will be executed, and the result - # data will be returned in the response. - # @!attribute [rw] generate_natural_language_answer - # @return [::Boolean] - # Optional. If true, a natural language answer based on the query execution - # result will be generated and returned in the response. - # @!attribute [rw] generate_explanation - # @return [::Boolean] - # Optional. If true, an explanation of the generated query will be returned - # in the response. - # @!attribute [rw] generate_disambiguation_question - # @return [::Boolean] - # Optional. If true (default to false), the service may return a - # clarifying_question if the input query is ambiguous. - class GenerationOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # References to data sources and context to use for the query. - # @!attribute [rw] datasource_references - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DatasourceReferences] - # Required. The datasource references to use for the query. - class QueryDataContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response containing the generated query and related information. - # @!attribute [rw] generated_query - # @return [::String] - # Generated query for the given user prompt. - # @!attribute [rw] intent_explanation - # @return [::String] - # A natural language explanation of the generated query. - # Populated if options.generate_explanation was true in the request. - # @!attribute [rw] query_result - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ExecutedQueryResult] - # The result of executing the query. - # Populated if options.generate_query_result or - # options.generate_natural_language_answer was true in the request, and - # execution was successful or attempted. - # @!attribute [rw] natural_language_answer - # @return [::String] - # A natural language answer to the query, based on the query_result. - # Populated if options.generate_natural_language_answer was true in the - # request and query execution was successful based in the response from - # executeSql API. - # @!attribute [rw] disambiguation_question - # @return [::Array<::String>] - # If ambiguity was detected in the natural language query and - # options.generate_disambiguation_question was true, this field contains a - # question to the user for clarification. The returned represents the - # service's best effort based on the ambiguous input. - class QueryDataResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of a query execution. The design is generic for all dialects. - # @!attribute [rw] columns - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::ExecutedQueryResult::Column>] - # The columns in the result set, in order. - # @!attribute [rw] rows - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::ExecutedQueryResult::Row>] - # The rows returned by the query. - # @!attribute [rw] total_row_count - # @return [::Integer] - # The total number of rows in the full result set, if known. - # This may be an estimate or an exact count. - # @!attribute [rw] partial_result - # @return [::Boolean] - # Set to true if the returned rows in `query_result` are a subset of the - # full result. This can happen, for example, if the query execution hits a - # row limit. When true, the `query_result` does not contain all - # rows. To retrieve the complete result, consider using the - # `generated_query` in `QueryDataResponse` and executing it in your own - # environment. - # @!attribute [rw] query_execution_error - # @return [::String] - # The error message if the query execution failed. - class ExecutedQueryResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a single column in the result set. - # @!attribute [rw] name - # @return [::String] - # The name of the column. - # @!attribute [rw] type - # @return [::String] - # The type of the column (e.g., "VARCHAR", "INT64", "TIMESTAMP"). - class Column - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a single value within a row. - # @!attribute [rw] value - # @return [::String] - # The cell value, represented in a string format. - # Timestamps could be formatted, for example, using RFC3339Nano. - # This field is used if the value is not null. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a single row in the result set. - # @!attribute [rw] values - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::ExecutedQueryResult::Value>] - # The values in the row, corresponding positionally to the columns. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request for listing chat messages based on parent and conversation_id. - # @!attribute [rw] parent - # @return [::String] - # Required. The conversation to list messages under. - # Format: - # `projects/{project}/locations/{location}/conversations/{conversation_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. The max page size is 100. All larger page sizes will be coerced - # to 100. If unspecified, server will pick 50 as an approperiate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for - # syntax. - # - # ListMessages allows filtering by: - # * create_time (e.g., `createTime > "2025-01-28T06:51:56-08:00"`) - # * update_time - class ListMessagesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing chat messages. - # @!attribute [rw] messages - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::StorageMessage>] - # The list of chat messages. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListMessagesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A stored message containing user message or system message. - # @!attribute [rw] message_id - # @return [::String] - # The unique resource name of a chat message. - # @!attribute [rw] message - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Message] - # The message content. - class StorageMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for Chat. - # @!attribute [rw] inline_context - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context] - # Optional. Inline context for the chat request. Use this to chat - # statelessly (without managed conversation persistence and without an - # Agent) by passing all context inline. - # - # Note: The following fields are mutually exclusive: `inline_context`, `conversation_reference`, `data_agent_context`, `client_managed_resource_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] conversation_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ConversationReference] - # Optional. Reference to a persisted conversation and agent context. - # Use this to chat with an Agent using managed conversation persistence. - # - # Note: The following fields are mutually exclusive: `conversation_reference`, `inline_context`, `data_agent_context`, `client_managed_resource_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data_agent_context - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext] - # Optional. Context for the chat request. Use this to chat with an Agent - # statelessly, without managed conversation persistence. - # - # Note: The following fields are mutually exclusive: `data_agent_context`, `inline_context`, `conversation_reference`, `client_managed_resource_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] client_managed_resource_context - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ClientManagedResourceContext] - # Optional. Context with client managed resources. - # Some clients may not use GDA managed resources including - # conversations and agents, instead they create and manage their own - # conversations and agents resources. - # - # Note: The following fields are mutually exclusive: `client_managed_resource_context`, `inline_context`, `conversation_reference`, `data_agent_context`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] project - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Optional. The Google Cloud project to be used for quota and billing. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent value for chat request. - # Pattern: `projects/{project}/locations/{location}` - # @!attribute [rw] messages - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Message>] - # Required. Content of current conversation. - class ChatRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Context for the chat request using a data agent. - # @!attribute [rw] data_agent - # @return [::String] - # Required. The name of the data agent resource. - # @!attribute [rw] credentials - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Credentials] - # Optional. The credentials to use when calling the Looker data source. - # - # Currently supports both OAuth token and API key-based credentials, as - # described in - # [Authentication with an - # SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk). - # @!attribute [rw] context_version - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext::ContextVersion] - # Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED) - class DataAgentContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # List of context versions supported by DCS. - # There are two versions of context. This is to maintain versioning for the - # data agent. - module ContextVersion - # Unspecified or unrecognized. - CONTEXT_VERSION_UNSPECIFIED = 0 - - # Using this version, DCS will use the latest staging context for the - # data agent. - STAGING = 1 - - # Using this version, DCS will use the latest published context for the - # data agent. - PUBLISHED = 2 - end - end - - # Reference to a persisted conversation and agent context. - # @!attribute [rw] conversation - # @return [::String] - # Required. Name of the conversation resource. - # Format: - # `projects/{project}/locations/{location}/conversations/{conversation_id}` - # @!attribute [rw] data_agent_context - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentContext] - # Required. Context for the chat request using a data agent. - class ConversationReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Context with client managed resources. - # Some clients may not use GDA managed resources including - # conversations and agents, instead they create and manage their own - # conversations and agents resources. - # @!attribute [rw] inline_context - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Context] - # Required. Context for the chat request. Use this to chat without GDA API - # managed conversation and agent persistence by passing all context inline. - # @!attribute [rw] conversation_id - # @return [::String] - # Optional. The client managed conversation id. - # @!attribute [rw] agent_id - # @return [::String] - # Optional. The client managed agent id. - class ClientManagedResourceContext - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message from an interaction between the user and the system. - # @!attribute [rw] user_message - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::UserMessage] - # A message from the user that is interacting with the system. - # - # Note: The following fields are mutually exclusive: `user_message`, `system_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] system_message - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SystemMessage] - # A message from the system in response to the user. - # - # Note: The following fields are mutually exclusive: `system_message`, `user_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] timestamp - # @return [::Google::Protobuf::Timestamp] - # Output only. For user messages, this is the time at which the system - # received the message. For system messages, this is the time at which the - # system generated the message. - # @!attribute [rw] message_id - # @return [::String] - # Optional. unique id of the message in the conversation for persistence. - class Message - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message from the user that is interacting with the system. - # @!attribute [rw] text - # @return [::String] - # Text should use this field instead of blob. - class UserMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message from the system in response to the user. This message can also be a - # message from the user as historical context for multiturn conversations with - # the system. - # @!attribute [rw] text - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::TextMessage] - # A direct natural language response to the user message. - # - # Note: The following fields are mutually exclusive: `text`, `schema`, `data`, `analysis`, `chart`, `error`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] schema - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SchemaMessage] - # A message produced during schema resolution. - # - # Note: The following fields are mutually exclusive: `schema`, `text`, `data`, `analysis`, `chart`, `error`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] data - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataMessage] - # A message produced during data retrieval. - # - # Note: The following fields are mutually exclusive: `data`, `text`, `schema`, `analysis`, `chart`, `error`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] analysis - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AnalysisMessage] - # A message produced during analysis. - # - # Note: The following fields are mutually exclusive: `analysis`, `text`, `schema`, `data`, `chart`, `error`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] chart - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartMessage] - # A message produced during chart generation. - # - # Note: The following fields are mutually exclusive: `chart`, `text`, `schema`, `data`, `analysis`, `error`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] error - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ErrorMessage] - # An error message. - # - # Note: The following fields are mutually exclusive: `error`, `text`, `schema`, `data`, `analysis`, `chart`, `example_queries`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] example_queries - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ExampleQueries] - # Optional. A message containing example queries. - # - # Note: The following fields are mutually exclusive: `example_queries`, `text`, `schema`, `data`, `analysis`, `chart`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] group_id - # @return [::Integer] - # Identifies the group that the event belongs to. Similar events are deemed - # to be logically relevant to each other and should be shown together in - # the UI. - class SystemMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A multi-part text message. - # @!attribute [rw] parts - # @return [::Array<::String>] - # Optional. The parts of the message. - # @!attribute [rw] text_type - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::TextMessage::TextType] - # Optional. The type of the text message. - class TextMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the text message. - module TextType - # The default text type. - TEXT_TYPE_UNSPECIFIED = 0 - - # The text is a final response to the user question. - FINAL_RESPONSE = 1 - - # The text is a thinking plan generated by the thinking tool. - THOUGHT = 2 - - # The text is an informational message about the agent's progress, such as - # a tool being invoked. This is distinct from the agent's internal thought - # process (`THOUGHT`) and the final answer to the user - # (`FINAL_RESPONSE`). These messages provide insight into the agent's - # actions. - PROGRESS = 3 - end - end - - # A message produced during schema resolution. - # @!attribute [rw] query - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SchemaQuery] - # A schema resolution query. - # - # Note: The following fields are mutually exclusive: `query`, `result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] result - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SchemaResult] - # The result of a schema resolution query. - # - # Note: The following fields are mutually exclusive: `result`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class SchemaMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A query for resolving the schema relevant to the posed question. - # @!attribute [rw] question - # @return [::String] - # Optional. The question to send to the system for schema resolution. - class SchemaQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of schema resolution. - # @!attribute [rw] datasources - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Datasource>] - # Optional. The datasources used to resolve the schema query. - class SchemaResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message produced during data retrieval. - # @!attribute [rw] query - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataQuery] - # A data retrieval query. - # - # Note: The following fields are mutually exclusive: `query`, `generated_sql`, `result`, `generated_looker_query`, `big_query_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] generated_sql - # @return [::String] - # SQL generated by the system to retrieve data. - # - # Note: The following fields are mutually exclusive: `generated_sql`, `query`, `result`, `generated_looker_query`, `big_query_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] result - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataResult] - # Retrieved data. - # - # Note: The following fields are mutually exclusive: `result`, `query`, `generated_sql`, `generated_looker_query`, `big_query_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] generated_looker_query - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery] - # Looker Query generated by the system to retrieve data. - # DEPRECATED: generated looker query is now under DataQuery.looker. - # - # Note: The following fields are mutually exclusive: `generated_looker_query`, `query`, `generated_sql`, `result`, `big_query_job`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] big_query_job - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::BigQueryJob] - # A BigQuery job executed by the system to retrieve data. - # - # Note: The following fields are mutually exclusive: `big_query_job`, `query`, `generated_sql`, `result`, `generated_looker_query`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A query for retrieving data. - # @!attribute [rw] looker - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerQuery] - # Optional. A query for retrieving data from a Looker explore. - # @!attribute [rw] question - # @return [::String] - # Optional. A natural language question to answer. - # @!attribute [rw] name - # @return [::String] - # Optional. A snake-case name for the query that reflects its intent. It is - # used to name the corresponding data result, so that it can be referenced in - # later steps. - # - # * Example: "total_sales_by_product" - # * Example: "sales_for_product_12345" - # @!attribute [rw] datasources - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Datasource>] - # Optional. The datasources available to answer the question. - class DataQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Retrieved data. - # @!attribute [rw] name - # @return [::String] - # Optional. A snake-case name for the data result that reflects its contents. - # The name is used to pass the result around by reference, and serves as a - # signal about its meaning. - # - # * Example: "total_sales_by_product" - # * Example: "sales_for_product_12345" - # @!attribute [rw] schema - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Schema] - # Optional. The schema of the data. - # @!attribute [rw] data - # @return [::Array<::Google::Protobuf::Struct>] - # Optional. The content of the data. Each row is a struct that matches the - # schema. Simple values are represented as strings, while nested structures - # are represented as lists or structs. - class DataResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A BigQuery job executed by the system. - # @!attribute [rw] project_id - # @return [::String] - # Required. The project that the job belongs to. - # - # See - # [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). - # @!attribute [rw] job_id - # @return [::String] - # Required. The ID of the job. - # - # See - # [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). - # @!attribute [rw] location - # @return [::String] - # Optional. The location of the job. - # - # See - # [JobReference](https://cloud.google.com/bigquery/docs/reference/rest/v2/JobReference). - # @!attribute [rw] destination_table - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::BigQueryTableReference] - # Optional. A reference to the destination table of the job's query results. - # - # See - # [JobConfigurationQuery](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobconfigurationquery). - # @!attribute [rw] schema - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Schema] - # Optional. The schema of the job's query results. - # - # See - # [JobStatistics2](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#jobstatistics2). - class BigQueryJob - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message produced during analysis. - # @!attribute [rw] query - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AnalysisQuery] - # An analysis query. - # - # Note: The following fields are mutually exclusive: `query`, `progress_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] progress_event - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AnalysisEvent] - # An event indicating the progress of the analysis. - # - # Note: The following fields are mutually exclusive: `progress_event`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AnalysisMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A query for performing an analysis. - # @!attribute [rw] question - # @return [::String] - # Optional. An analysis question to help answer the user's original question. - # @!attribute [rw] data_result_names - # @return [::Array<::String>] - # Optional. The names of previously retrieved data results to analyze. - class AnalysisQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An event indicating the progress of an analysis. - # @!attribute [rw] planner_reasoning - # @return [::String] - # Python codegen planner's reasoning. - # - # Note: The following fields are mutually exclusive: `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] coder_instruction - # @return [::String] - # Instructions issued for code generation. - # - # Note: The following fields are mutually exclusive: `coder_instruction`, `planner_reasoning`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] code - # @return [::String] - # Generated code. - # - # Note: The following fields are mutually exclusive: `code`, `planner_reasoning`, `coder_instruction`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] execution_output - # @return [::String] - # Output from code execution. - # - # Note: The following fields are mutually exclusive: `execution_output`, `planner_reasoning`, `coder_instruction`, `code`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] execution_error - # @return [::String] - # An error from code execution. - # - # Note: The following fields are mutually exclusive: `execution_error`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] result_vega_chart_json - # @return [::String] - # Result as Vega chart JSON string. - # - # Note: The following fields are mutually exclusive: `result_vega_chart_json`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_natural_language`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] result_natural_language - # @return [::String] - # Result as NL string. - # - # Note: The following fields are mutually exclusive: `result_natural_language`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_csv_data`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] result_csv_data - # @return [::String] - # Result as CSV string. - # - # Note: The following fields are mutually exclusive: `result_csv_data`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_reference_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] result_reference_data - # @return [::String] - # Result as a reference to a data source. - # - # Note: The following fields are mutually exclusive: `result_reference_data`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] error - # @return [::String] - # A generic error message. - # - # Note: The following fields are mutually exclusive: `error`, `planner_reasoning`, `coder_instruction`, `code`, `execution_output`, `execution_error`, `result_vega_chart_json`, `result_natural_language`, `result_csv_data`, `result_reference_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AnalysisEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message produced during chart generation. - # @!attribute [rw] query - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartQuery] - # A query for generating a chart. - # - # Note: The following fields are mutually exclusive: `query`, `result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] result - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::ChartResult] - # The result of a chart generation query. - # - # Note: The following fields are mutually exclusive: `result`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ChartMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A query for generating a chart. - # @!attribute [rw] instructions - # @return [::String] - # Optional. Natural language instructions for generating the chart. - # @!attribute [rw] data_result_name - # @return [::String] - # Optional. The name of a previously retrieved data result to use in the - # chart. - class ChartQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The result of a chart generation query. - # @!attribute [rw] vega_config - # @return [::Google::Protobuf::Struct] - # Optional. A generated Vega chart config. - # See https://vega.github.io/vega/docs/config/ - # @!attribute [rw] image - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Blob] - # Optional. A rendering of the chart if this was requested in the context. - class ChartResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An error message from a tool call. - # This message is used to represent an error that occurred while an agent was - # trying to use a tool. It's important to note that not all errors are - # terminal. Many are recoverable, and the agent may use the information from - # this error message to self-correct and retry the tool call or try a - # different approach. - # - # For example, if a data query fails, the agent might receive an - # `ErrorMessage`, analyze it, and then generate a corrected query. - # - # Clients should be cautious about interpreting this message as a definitive - # failure. It can be part of the agent's normal, iterative process of - # completing a task. Surfacing these errors directly to end-users without - # context (e.g., as a "hard failure") may be misleading. - # @!attribute [r] text - # @return [::String] - # Output only. The text of the error. - class ErrorMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message containing derived and authored example queries. - # @!attribute [rw] example_queries - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::ExampleQuery>] - # Optional. A list of derived and authored example queries, providing - # examples of relevant and commonly used SQL queries and their corresponding - # natural language queries optionally present. Currently only used for - # BigQuery data sources. - class ExampleQueries - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A blob of data with a MIME type. - # @!attribute [rw] mime_type - # @return [::String] - # Required. The IANA standard MIME type of the message data. - # @!attribute [rw] data - # @return [::String] - # Required. The data represented as bytes. - class Blob - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb deleted file mode 100644 index 96575cdbf6ec..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/cloud/geminidataanalytics/v1beta/datasource.rb +++ /dev/null @@ -1,465 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GeminiDataAnalytics - module V1beta - # A collection of references to datasources. - # @!attribute [rw] bq - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::BigQueryTableReferences] - # References to BigQuery tables. - # - # Note: The following fields are mutually exclusive: `bq`, `studio`, `looker`, `alloydb`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] studio - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::StudioDatasourceReferences] - # References to Looker Studio datasources. - # - # Note: The following fields are mutually exclusive: `studio`, `bq`, `looker`, `alloydb`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] looker - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerExploreReferences] - # References to Looker Explores. - # - # Note: The following fields are mutually exclusive: `looker`, `bq`, `studio`, `alloydb`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] alloydb - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AlloyDbReference] - # Reference to an AlloyDB database. Only supported for the `QueryData` - # method. - # - # Note: The following fields are mutually exclusive: `alloydb`, `bq`, `studio`, `looker`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] spanner_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SpannerReference] - # Reference to a Spanner database. Only supported for the `QueryData` - # method. - # - # Note: The following fields are mutually exclusive: `spanner_reference`, `bq`, `studio`, `looker`, `alloydb`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_sql_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::CloudSqlReference] - # Reference to a CloudSql database. Only supported for the `QueryData` - # method. - # - # Note: The following fields are mutually exclusive: `cloud_sql_reference`, `bq`, `studio`, `looker`, `alloydb`, `spanner_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DatasourceReferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing references to BigQuery tables and property graphs. - # At least one of `table_references` or `property_graph_references` must be - # populated. - # @!attribute [rw] table_references - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::BigQueryTableReference>] - # Optional. References to BigQuery tables. - class BigQueryTableReferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing a reference to a single BigQuery table. - # @!attribute [rw] project_id - # @return [::String] - # Required. The project that the table belongs to. - # @!attribute [rw] dataset_id - # @return [::String] - # Required. The dataset that the table belongs to. - # @!attribute [rw] table_id - # @return [::String] - # Required. The table id. - # @!attribute [rw] schema - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Schema] - # Optional. The schema of the datasource. - class BigQueryTableReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing references to Looker Studio datasources. - # @!attribute [rw] studio_references - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::StudioDatasourceReference>] - # The references to the studio datasources. - class StudioDatasourceReferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing a reference to a single Looker Studio datasource. - # @!attribute [rw] datasource_id - # @return [::String] - # Required. The id of the datasource. - class StudioDatasourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing reference to an AlloyDB database and agent context. - # Only supported for the `QueryData` method. - # @!attribute [rw] database_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AlloyDbDatabaseReference] - # Required. Singular proto that supports specifying which database and tables - # to include. - # @!attribute [rw] agent_context_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AgentContextReference] - # Optional. Parameters for retrieving data from Agent Context. - class AlloyDbReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing a reference to a single AlloyDB database. - # @!attribute [rw] project_id - # @return [::String] - # Required. The project the instance belongs to. - # @!attribute [rw] region - # @return [::String] - # Required. The region of the instance. - # @!attribute [rw] cluster_id - # @return [::String] - # Required. The cluster id. - # @!attribute [rw] instance_id - # @return [::String] - # Required. The instance id. - # @!attribute [rw] database_id - # @return [::String] - # Required. The database id. - # @!attribute [rw] table_ids - # @return [::Array<::String>] - # Optional. The table ids. Denotes all tables if unset. - class AlloyDbDatabaseReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing reference to a Spanner database and agent context. - # Only supported for the `QueryData` method. - # @!attribute [rw] database_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SpannerDatabaseReference] - # Required. Singular proto that supports specifying which database and tables - # to include. - # @!attribute [rw] agent_context_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AgentContextReference] - # Optional. Parameters for retrieving data from Agent Context. - class SpannerReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing a reference to a single Spanner database. - # @!attribute [rw] engine - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SpannerDatabaseReference::Engine] - # Required. The engine of the Spanner instance. - # @!attribute [rw] project_id - # @return [::String] - # Required. The project the instance belongs to. - # @!attribute [rw] region - # @return [::String] - # Required. The region of the instance. - # @!attribute [rw] instance_id - # @return [::String] - # Required. The instance id. - # @!attribute [rw] database_id - # @return [::String] - # Required. The database id. - # @!attribute [rw] table_ids - # @return [::Array<::String>] - # Optional. The table ids. Denotes all tables if unset. - class SpannerDatabaseReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The database engine. - module Engine - # Engine is not specified. - ENGINE_UNSPECIFIED = 0 - - # Google SQL - GOOGLE_SQL = 1 - - # PostgreSQL - POSTGRESQL = 2 - end - end - - # Message representing reference to a CloudSQL database and agent context. - # Only supported for the `QueryData` method. - # @!attribute [rw] database_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::CloudSqlDatabaseReference] - # Required. Singular proto that supports specifying which database and tables - # to include. - # @!attribute [rw] agent_context_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AgentContextReference] - # Optional. Parameters for retrieving data from Agent Context. - class CloudSqlReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing a reference to a single CloudSQL database. - # @!attribute [rw] engine - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::CloudSqlDatabaseReference::Engine] - # Required. The engine of the Cloud SQL instance. - # @!attribute [rw] project_id - # @return [::String] - # Required. The project the instance belongs to. - # @!attribute [rw] region - # @return [::String] - # Required. The region of the instance. - # @!attribute [rw] instance_id - # @return [::String] - # Required. The instance id. - # @!attribute [rw] database_id - # @return [::String] - # Required. The database id. - # @!attribute [rw] table_ids - # @return [::Array<::String>] - # Optional. The table ids. Denotes all tables if unset. - class CloudSqlDatabaseReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The database engine. - module Engine - # Engine is not specified. - ENGINE_UNSPECIFIED = 0 - - # PostgreSQL - POSTGRESQL = 1 - - # MySQL - MYSQL = 2 - end - end - - # Message representing references to Looker explores. - # @!attribute [rw] explore_references - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::LookerExploreReference>] - # Required. References to Looker explores. - # @!attribute [rw] credentials - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Credentials] - # Optional. The credentials to use when calling the Looker API. - # - # Currently supports both OAuth token and API key-based credentials, as - # described in - # [Authentication with an - # SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk). - class LookerExploreReferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing a reference to a single Looker explore. - # @!attribute [rw] looker_instance_uri - # @return [::String] - # Required. The base url of the Looker instance. - # - # Note: The following fields are mutually exclusive: `looker_instance_uri`, `private_looker_instance_info`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] private_looker_instance_info - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::PrivateLookerInstanceInfo] - # Private Looker instance info. - # - # Note: The following fields are mutually exclusive: `private_looker_instance_info`, `looker_instance_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] lookml_model - # @return [::String] - # Required. Looker model, as outlined in - # [Major LookML - # structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures). - # Name of the LookML model. - # @!attribute [rw] explore - # @return [::String] - # Required. Looker Explore, as outlined in - # [Major LookML - # structures](https://cloud.google.com/looker/docs/lookml-terms-and-concepts#major_lookml_structures). - # Name of the LookML Explore. - # @!attribute [rw] schema - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Schema] - # Optional. The schema of the datasource. - class LookerExploreReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message representing a private Looker instance info required if the Looker - # instance is behind a private network. - # @!attribute [rw] looker_instance_id - # @return [::String] - # The Looker instance id. - # @!attribute [rw] service_directory_name - # @return [::String] - # The service directory name of the Looker instance. - class PrivateLookerInstanceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A datasource that can be used to answer questions. - # @!attribute [rw] bigquery_table_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::BigQueryTableReference] - # A reference to a BigQuery table. - # - # Note: The following fields are mutually exclusive: `bigquery_table_reference`, `studio_datasource_id`, `looker_explore_reference`, `alloy_db_reference`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] studio_datasource_id - # @return [::String] - # A reference to a Looker Studio datasource. - # - # Note: The following fields are mutually exclusive: `studio_datasource_id`, `bigquery_table_reference`, `looker_explore_reference`, `alloy_db_reference`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] looker_explore_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::LookerExploreReference] - # A reference to a Looker explore. - # - # Note: The following fields are mutually exclusive: `looker_explore_reference`, `bigquery_table_reference`, `studio_datasource_id`, `alloy_db_reference`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] alloy_db_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::AlloyDbReference] - # A reference to an AlloyDB database. - # - # Note: The following fields are mutually exclusive: `alloy_db_reference`, `bigquery_table_reference`, `studio_datasource_id`, `looker_explore_reference`, `spanner_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] spanner_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::SpannerReference] - # A reference to a Spanner database. - # - # Note: The following fields are mutually exclusive: `spanner_reference`, `bigquery_table_reference`, `studio_datasource_id`, `looker_explore_reference`, `alloy_db_reference`, `cloud_sql_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_sql_reference - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::CloudSqlReference] - # A reference to a CloudSQL database. - # - # Note: The following fields are mutually exclusive: `cloud_sql_reference`, `bigquery_table_reference`, `studio_datasource_id`, `looker_explore_reference`, `alloy_db_reference`, `spanner_reference`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] schema - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::Schema] - # Optional. The schema of the datasource. - # @!attribute [rw] struct_schema - # @return [::Google::Protobuf::Struct] - # Optional. A struct representation of the schema. - # This is populated for datasources with schemas that cannot be - # fully represented by the strongly-typed `schema` field. - # - # For Looker datasources, this maps to the LookmlModelExplore type: - # https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore - class Datasource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The schema of a Datasource or QueryResult instance. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Field>] - # Optional. The fields in the schema. - # @!attribute [rw] description - # @return [::String] - # Optional. A textual description of the table's content and purpose. - # For example: "Contains information about customer orders in our e-commerce - # store." Currently only used for BigQuery data sources. - # @!attribute [rw] synonyms - # @return [::Array<::String>] - # Optional. A list of alternative names or synonyms that can be used to refer - # to the table. For example: ["sales", "orders", "purchases"]. Currently only - # used for BigQuery data sources. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Optional. A list of tags or keywords associated with the table, used for - # categorization. For example: ["transaction", "revenue", "customer_data"]. - # Currently only used for BigQuery data sources. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Table display_name (same as label in - # cloud/data_analytics/anarres/data/looker/proto/model_explore.proto), not - # required, currently only Looker has this field. - # @!attribute [rw] filters - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::DataFilter>] - # Optional. The filters on the datasource's underlying data. Currently only - # used for Looker data sources. - class Schema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A field in a schema. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of the field. - # @!attribute [rw] type - # @return [::String] - # Optional. The type of the field. - # @!attribute [rw] description - # @return [::String] - # Optional. A brief description of the field. - # @!attribute [rw] mode - # @return [::String] - # Optional. The mode of the field (e.g., NULLABLE, REPEATED). - # @!attribute [rw] synonyms - # @return [::Array<::String>] - # Optional. A list of alternative names or synonyms that can be used to refer - # to this field. For example: ["id", "customerid", "cust_id"]. Currently only - # used for BigQuery data sources. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Optional. A list of tags or keywords associated with the field, used for - # categorization. For example: ["identifier", "customer", "pii"]. Currently - # only used for BigQuery data sources. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Field display_name (same as label in - # @!attribute [rw] subfields - # @return [::Array<::Google::Cloud::GeminiDataAnalytics::V1beta::Field>] - # Optional. Recursive property for nested schema structures. - # @!attribute [rw] category - # @return [::String] - # Optional. Field category, not required, currently only useful for Looker. - # We are using a string to avoid depending on an external package and keep - # this package self-contained. - # @!attribute [rw] value_format - # @return [::String] - # Optional. Looker only. Value format of the field. - # Ref: - # https://cloud.google.com/looker/docs/reference/param-field-value-format - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A filter on a datasource's underlying data. Filter syntax documentation: - # https://cloud.google.com/looker/docs/filter-expressions - # @!attribute [rw] field - # @return [::String] - # Optional. The field to filter on. For example: ["event_date", - # "customer_id", "product_category"] - # @!attribute [rw] value - # @return [::String] - # Optional. The default value used for this filter if the filter is not - # overridden in a query. For example: ["after 2024-01-01", "123", "-fashion"] - # @!attribute [rw] type - # @return [::Google::Cloud::GeminiDataAnalytics::V1beta::DataFilterType] - # Optional. The type of filter present on a datasource, such as - # ALWAYS_FILTER. - class DataFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of filter present on a datasource, such as ALWAYS_FILTER. - module DataFilterType - # The filter type was not specified. - DATA_FILTER_TYPE_UNSPECIFIED = 0 - - # A filter that the user configures, and any queries to the Explore will - # always apply this filter by default. Currently only used for Looker data - # sources. - ALWAYS_FILTER = 1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index fbee4c39d435..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 848f8c2f7895..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 79fdbd1e2eff..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index f2d9d79d9da4..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 9e9bdbb09ea4..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index 341efa296c29..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index c2acab1235a9..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index ad3c3ad25f0f..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index b8b33e5c8cec..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index a005f395ccab..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 54bd4318d321..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,121 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/rpc/status.rb deleted file mode 100644 index 3f61f95b2587..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/type/expr.rb deleted file mode 100644 index 9505eeb8657e..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/Gemfile deleted file mode 100644 index 35c4eece9108..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-gemini_data_analytics-v1beta", path: "../" -else - gem "google-cloud-gemini_data_analytics-v1beta" -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-gemini_data_analytics-v1beta/snippets/data_agent_service/create_data_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/create_data_agent.rb deleted file mode 100644 index de0cc501f6dd..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/create_data_agent.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the create_data_agent call in the DataAgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#create_data_agent. -# -def create_data_agent - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new - - # Call the create_data_agent method. - result = client.create_data_agent 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 geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/delete_data_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/delete_data_agent.rb deleted file mode 100644 index 6dac918c76e0..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/delete_data_agent.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the delete_data_agent call in the DataAgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#delete_data_agent. -# -def delete_data_agent - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new - - # Call the delete_data_agent method. - result = client.delete_data_agent 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 geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_data_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_data_agent.rb deleted file mode 100644 index 579f75a66312..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_data_agent.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataAgentService_GetDataAgent_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the get_data_agent call in the DataAgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_data_agent. -# -def get_data_agent - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.new - - # Call the get_data_agent method. - result = client.get_data_agent request - - # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent. - p result -end -# [END geminidataanalytics_v1beta_generated_DataAgentService_GetDataAgent_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_iam_policy.rb deleted file mode 100644 index f9f9e44332f4..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataAgentService_GetIamPolicy_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the get_iam_policy call in the DataAgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END geminidataanalytics_v1beta_generated_DataAgentService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_accessible_data_agents.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_accessible_data_agents.rb deleted file mode 100644 index 37741baa1572..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_accessible_data_agents.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataAgentService_ListAccessibleDataAgents_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the list_accessible_data_agents call in the DataAgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_accessible_data_agents. -# -def list_accessible_data_agents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new - - # Call the list_accessible_data_agents method. - result = client.list_accessible_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. - p item - end -end -# [END geminidataanalytics_v1beta_generated_DataAgentService_ListAccessibleDataAgents_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_data_agents.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_data_agents.rb deleted file mode 100644 index cb339d6a8922..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/list_data_agents.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataAgentService_ListDataAgents_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the list_data_agents call in the DataAgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_data_agents. -# -def list_data_agents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new - - # Call the list_data_agents method. - result = client.list_data_agents 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::GeminiDataAnalytics::V1beta::DataAgent. - p item - end -end -# [END geminidataanalytics_v1beta_generated_DataAgentService_ListDataAgents_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/set_iam_policy.rb deleted file mode 100644 index e4aaec98f242..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataAgentService_SetIamPolicy_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the set_iam_policy call in the DataAgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END geminidataanalytics_v1beta_generated_DataAgentService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/update_data_agent.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/update_data_agent.rb deleted file mode 100644 index 33e824f2bacb..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_agent_service/update_data_agent.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the update_data_agent call in the DataAgentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#update_data_agent. -# -def update_data_agent - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new - - # Call the update_data_agent method. - result = client.update_data_agent 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 geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/chat.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/chat.rb deleted file mode 100644 index e864587ed997..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/chat.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataChatService_Chat_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the chat call in the DataChatService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#chat. -# -def chat - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new - - # Call the chat method to start streaming. - output = client.chat request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::GeminiDataAnalytics::V1beta::Message - output.each do |current_response| - p current_response - end -end -# [END geminidataanalytics_v1beta_generated_DataChatService_Chat_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/create_conversation.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/create_conversation.rb deleted file mode 100644 index 0d5551701b65..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/create_conversation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataChatService_CreateConversation_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the create_conversation call in the DataChatService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#create_conversation. -# -def create_conversation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new - - # Call the create_conversation method. - result = client.create_conversation request - - # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. - p result -end -# [END geminidataanalytics_v1beta_generated_DataChatService_CreateConversation_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/delete_conversation.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/delete_conversation.rb deleted file mode 100644 index 41cd8a554cb5..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/delete_conversation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataChatService_DeleteConversation_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the delete_conversation call in the DataChatService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#delete_conversation. -# -def delete_conversation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new - - # Call the delete_conversation method. - result = client.delete_conversation request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END geminidataanalytics_v1beta_generated_DataChatService_DeleteConversation_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/get_conversation.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/get_conversation.rb deleted file mode 100644 index bbe91f289e8a..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/get_conversation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataChatService_GetConversation_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the get_conversation call in the DataChatService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#get_conversation. -# -def get_conversation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new - - # Call the get_conversation method. - result = client.get_conversation request - - # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::Conversation. - p result -end -# [END geminidataanalytics_v1beta_generated_DataChatService_GetConversation_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_conversations.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_conversations.rb deleted file mode 100644 index adbec4557800..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_conversations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataChatService_ListConversations_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the list_conversations call in the DataChatService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_conversations. -# -def list_conversations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.new - - # Call the list_conversations method. - result = client.list_conversations 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::GeminiDataAnalytics::V1beta::Conversation. - p item - end -end -# [END geminidataanalytics_v1beta_generated_DataChatService_ListConversations_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_messages.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_messages.rb deleted file mode 100644 index 54d9d15f12ae..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/list_messages.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataChatService_ListMessages_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the list_messages call in the DataChatService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_messages. -# -def list_messages - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.new - - # Call the list_messages method. - result = client.list_messages 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::GeminiDataAnalytics::V1beta::StorageMessage. - p item - end -end -# [END geminidataanalytics_v1beta_generated_DataChatService_ListMessages_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/query_data.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/query_data.rb deleted file mode 100644 index 0dc1f4290712..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/data_chat_service/query_data.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START geminidataanalytics_v1beta_generated_DataChatService_QueryData_sync] -require "google/cloud/gemini_data_analytics/v1beta" - -## -# Snippet for the query_data call in the DataChatService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#query_data. -# -def query_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new - - # Call the query_data method. - result = client.query_data request - - # The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse. - p result -end -# [END geminidataanalytics_v1beta_generated_DataChatService_QueryData_sync] diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json deleted file mode 100644 index 55fa2418f776..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/snippets/snippet_metadata_google.cloud.geminidataanalytics.v1beta.json +++ /dev/null @@ -1,615 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-gemini_data_analytics-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.geminidataanalytics.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_ListDataAgents_sync", - "title": "Snippet for the list_data_agents call in the DataAgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_data_agents.", - "file": "data_agent_service/list_data_agents.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_agents", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_data_agents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse", - "client": { - "short_name": "DataAgentService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" - }, - "method": { - "short_name": "ListDataAgents", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.ListDataAgents", - "service": { - "short_name": "DataAgentService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_ListAccessibleDataAgents_sync", - "title": "Snippet for the list_accessible_data_agents call in the DataAgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_accessible_data_agents.", - "file": "data_agent_service/list_accessible_data_agents.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_accessible_data_agents", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#list_accessible_data_agents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse", - "client": { - "short_name": "DataAgentService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" - }, - "method": { - "short_name": "ListAccessibleDataAgents", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.ListAccessibleDataAgents", - "service": { - "short_name": "DataAgentService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_GetDataAgent_sync", - "title": "Snippet for the get_data_agent call in the DataAgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_data_agent.", - "file": "data_agent_service/get_data_agent.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_agent", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_data_agent", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent", - "client": { - "short_name": "DataAgentService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" - }, - "method": { - "short_name": "GetDataAgent", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.GetDataAgent", - "service": { - "short_name": "DataAgentService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_CreateDataAgent_sync", - "title": "Snippet for the create_data_agent call in the DataAgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#create_data_agent.", - "file": "data_agent_service/create_data_agent.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_agent", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#create_data_agent", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataAgentService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" - }, - "method": { - "short_name": "CreateDataAgent", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.CreateDataAgent", - "service": { - "short_name": "DataAgentService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_UpdateDataAgent_sync", - "title": "Snippet for the update_data_agent call in the DataAgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#update_data_agent.", - "file": "data_agent_service/update_data_agent.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_agent", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#update_data_agent", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataAgentService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" - }, - "method": { - "short_name": "UpdateDataAgent", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.UpdateDataAgent", - "service": { - "short_name": "DataAgentService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_DeleteDataAgent_sync", - "title": "Snippet for the delete_data_agent call in the DataAgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#delete_data_agent.", - "file": "data_agent_service/delete_data_agent.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_agent", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#delete_data_agent", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "DataAgentService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" - }, - "method": { - "short_name": "DeleteDataAgent", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.DeleteDataAgent", - "service": { - "short_name": "DataAgentService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the DataAgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_iam_policy.", - "file": "data_agent_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "DataAgentService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.GetIamPolicy", - "service": { - "short_name": "DataAgentService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataAgentService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the DataAgentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#set_iam_policy.", - "file": "data_agent_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "DataAgentService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService.SetIamPolicy", - "service": { - "short_name": "DataAgentService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataAgentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_Chat_sync", - "title": "Snippet for the chat call in the DataChatService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#chat.", - "file": "data_chat_service/chat.rb", - "language": "RUBY", - "client_method": { - "short_name": "chat", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#chat", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::Message", - "client": { - "short_name": "DataChatService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" - }, - "method": { - "short_name": "Chat", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.Chat", - "service": { - "short_name": "DataChatService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_CreateConversation_sync", - "title": "Snippet for the create_conversation call in the DataChatService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#create_conversation.", - "file": "data_chat_service/create_conversation.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_conversation", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#create_conversation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation", - "client": { - "short_name": "DataChatService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" - }, - "method": { - "short_name": "CreateConversation", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.CreateConversation", - "service": { - "short_name": "DataChatService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_DeleteConversation_sync", - "title": "Snippet for the delete_conversation call in the DataChatService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#delete_conversation.", - "file": "data_chat_service/delete_conversation.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_conversation", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#delete_conversation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataChatService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" - }, - "method": { - "short_name": "DeleteConversation", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.DeleteConversation", - "service": { - "short_name": "DataChatService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_GetConversation_sync", - "title": "Snippet for the get_conversation call in the DataChatService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#get_conversation.", - "file": "data_chat_service/get_conversation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_conversation", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#get_conversation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation", - "client": { - "short_name": "DataChatService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" - }, - "method": { - "short_name": "GetConversation", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.GetConversation", - "service": { - "short_name": "DataChatService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_ListConversations_sync", - "title": "Snippet for the list_conversations call in the DataChatService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_conversations.", - "file": "data_chat_service/list_conversations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_conversations", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_conversations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse", - "client": { - "short_name": "DataChatService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" - }, - "method": { - "short_name": "ListConversations", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.ListConversations", - "service": { - "short_name": "DataChatService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_ListMessages_sync", - "title": "Snippet for the list_messages call in the DataChatService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_messages.", - "file": "data_chat_service/list_messages.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_messages", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#list_messages", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse", - "client": { - "short_name": "DataChatService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" - }, - "method": { - "short_name": "ListMessages", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.ListMessages", - "service": { - "short_name": "DataChatService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "geminidataanalytics_v1beta_generated_DataChatService_QueryData_sync", - "title": "Snippet for the query_data call in the DataChatService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#query_data.", - "file": "data_chat_service/query_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "query_data", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client#query_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse", - "client": { - "short_name": "DataChatService::Client", - "full_name": "::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client" - }, - "method": { - "short_name": "QueryData", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService.QueryData", - "service": { - "short_name": "DataChatService", - "full_name": "google.cloud.geminidataanalytics.v1beta.DataChatService" - } - } - }, - "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-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_operations_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_operations_test.rb deleted file mode 100644 index fafc082205b3..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_agent_service_pb" -require "google/cloud/geminidataanalytics/v1beta/data_agent_service_services_pb" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service" - -class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_paths_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_paths_test.rb deleted file mode 100644 index c03aa78ff4cd..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/gemini_data_analytics/v1beta/data_agent_service" - -class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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_agent_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_agent_path project: "value0", location: "value1", data_agent: "value2" - assert_equal "projects/value0/locations/value1/dataAgents/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_rest_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_rest_test.rb deleted file mode 100644 index cec5c192d53b..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_rest_test.rb +++ /dev/null @@ -1,551 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_agent_service_pb" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service/rest" - - -class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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_list_data_agents - # Create test objects. - client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse.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" - order_by = "hello world" - show_deleted = true - - list_data_agents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_list_data_agents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_agents_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_agents ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_agents(::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_agents_client_stub.call_count - end - end - end - - def test_list_accessible_data_agents - # Create test objects. - client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse.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" - order_by = "hello world" - show_deleted = true - creator_filter = :CREATOR_FILTER_UNSPECIFIED - - list_accessible_data_agents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_list_accessible_data_agents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_accessible_data_agents_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_accessible_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_accessible_data_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_accessible_data_agents ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_accessible_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_accessible_data_agents(::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_accessible_data_agents_client_stub.call_count - end - end - end - - def test_get_data_agent - # Create test objects. - client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_agent_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_get_data_agent_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_agent_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_agent({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_agent name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_agent({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_agent_client_stub.call_count - end - end - end - - def test_create_data_agent - # 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" - data_agent_id = "hello world" - data_agent = {} - request_id = "hello world" - - create_data_agent_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_create_data_agent_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_agent_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_agent({ parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_agent parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new(parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_agent({ parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new(parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_agent_client_stub.call_count - end - end - end - - def test_update_data_agent - # 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. - update_mask = {} - data_agent = {} - request_id = "hello world" - - update_data_agent_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_update_data_agent_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_agent_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_agent({ update_mask: update_mask, data_agent: data_agent, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_agent update_mask: update_mask, data_agent: data_agent, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new(update_mask: update_mask, data_agent: data_agent, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_agent({ update_mask: update_mask, data_agent: data_agent, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new(update_mask: update_mask, data_agent: data_agent, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_agent_client_stub.call_count - end - end - end - - def test_delete_data_agent - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_data_agent_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_delete_data_agent_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_agent_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_agent({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_agent name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_agent({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_agent_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_test.rb deleted file mode 100644 index 372c63984b2a..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_agent_service_test.rb +++ /dev/null @@ -1,647 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_agent_service_pb" -require "google/cloud/gemini_data_analytics/v1beta/data_agent_service" - -class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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_list_data_agents - # Create GRPC objects. - grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - order_by = "hello world" - show_deleted = true - - list_data_agents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_agents, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest, 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"] - assert_equal "hello world", request["order_by"] - assert_equal true, request["show_deleted"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_agents_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted }) 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_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted 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_agents ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted) 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_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted }, 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_agents(::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted), 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_agents_client_stub.call_rpc_count - end - end - - def test_list_accessible_data_agents - # Create GRPC objects. - grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - order_by = "hello world" - show_deleted = true - creator_filter = :CREATOR_FILTER_UNSPECIFIED - - list_accessible_data_agents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_accessible_data_agents, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest, 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"] - assert_equal "hello world", request["order_by"] - assert_equal true, request["show_deleted"] - assert_equal :CREATOR_FILTER_UNSPECIFIED, request["creator_filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_accessible_data_agents_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_accessible_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_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_accessible_data_agents parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_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_accessible_data_agents ::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_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_accessible_data_agents({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_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_accessible_data_agents(::Google::Cloud::GeminiDataAnalytics::V1beta::ListAccessibleDataAgentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, show_deleted: show_deleted, creator_filter: creator_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_accessible_data_agents_client_stub.call_rpc_count - end - end - - def test_get_data_agent - # Create GRPC objects. - grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent.new - grpc_operation = GRPC::ActiveCall::Operation.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_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_agent, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_agent_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_agent({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_agent name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.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_agent({ 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_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::GetDataAgentRequest.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_agent_client_stub.call_rpc_count - end - end - - def test_create_data_agent - # 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" - data_agent_id = "hello world" - data_agent = {} - request_id = "hello world" - - create_data_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_agent, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_agent_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent), request["data_agent"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_agent_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_agent({ parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id }) 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_data_agent parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id 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_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new(parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id) 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_data_agent({ parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id }, 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_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::CreateDataAgentRequest.new(parent: parent, data_agent_id: data_agent_id, data_agent: data_agent, request_id: request_id), 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_data_agent_client_stub.call_rpc_count - end - end - - def test_update_data_agent - # 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. - update_mask = {} - data_agent = {} - request_id = "hello world" - - update_data_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_agent, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent), request["data_agent"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_agent_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_agent({ update_mask: update_mask, data_agent: data_agent, request_id: request_id }) 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.update_data_agent update_mask: update_mask, data_agent: data_agent, request_id: request_id 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.update_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new(update_mask: update_mask, data_agent: data_agent, request_id: request_id) 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.update_data_agent({ update_mask: update_mask, data_agent: data_agent, request_id: request_id }, 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.update_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::UpdateDataAgentRequest.new(update_mask: update_mask, data_agent: data_agent, request_id: request_id), 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, update_data_agent_client_stub.call_rpc_count - end - end - - def test_delete_data_agent - # 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" - request_id = "hello world" - - delete_data_agent_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_agent, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_agent_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_agent({ name: name, request_id: request_id }) 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.delete_data_agent name: name, request_id: request_id 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.delete_data_agent ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new(name: name, request_id: request_id) 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.delete_data_agent({ name: name, request_id: request_id }, 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.delete_data_agent(::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteDataAgentRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_agent_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, 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.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, 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, set_iam_policy_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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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::GeminiDataAnalytics::V1beta::DataAgentService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_paths_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_paths_test.rb deleted file mode 100644 index f47f7fb34ff5..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_paths_test.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/gemini_data_analytics/v1beta/data_chat_service" - -class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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_conversation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.conversation_path project: "value0", location: "value1", conversation: "value2" - assert_equal "projects/value0/locations/value1/conversations/value2", path - end - end - - def test_data_agent_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_agent_path project: "value0", location: "value1", data_agent: "value2" - assert_equal "projects/value0/locations/value1/dataAgents/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_rest_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_rest_test.rb deleted file mode 100644 index 85ff993c3efc..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_rest_test.rb +++ /dev/null @@ -1,492 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_chat_service_pb" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service/rest" - - -class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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_chat - # Create test objects. - client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Message.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - inline_context = {} - project = "hello world" - parent = "hello world" - messages = [{}] - - chat_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_chat_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, chat_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.chat({ inline_context: inline_context, project: project, parent: parent, messages: messages }) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use named arguments - client.chat inline_context: inline_context, project: project, parent: parent, messages: messages do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object - client.chat ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new(inline_context: inline_context, project: project, parent: parent, messages: messages) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use hash object with options - client.chat({ inline_context: inline_context, project: project, parent: parent, messages: messages }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object with options - client.chat(::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new(inline_context: inline_context, project: project, parent: parent, messages: messages), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Verify method calls - assert_equal 5, chat_client_stub.call_count - end - end - end - - def test_create_conversation - # Create test objects. - client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - conversation_id = "hello world" - conversation = {} - request_id = "hello world" - - create_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_create_conversation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_conversation_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_conversation({ parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_conversation parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new(parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_conversation({ parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new(parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_conversation_client_stub.call_count - end - end - end - - def test_delete_conversation - # 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_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_delete_conversation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_conversation_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_conversation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_conversation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_conversation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_conversation_client_stub.call_count - end - end - end - - def test_get_conversation - # Create test objects. - client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_conversation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_get_conversation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_conversation_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_conversation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_conversation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_conversation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_conversation_client_stub.call_count - end - end - end - - def test_list_conversations - # Create test objects. - client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse.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_conversations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_list_conversations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_conversations_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_conversations({ 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_conversations 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_conversations ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.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_conversations({ 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_conversations(::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.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_conversations_client_stub.call_count - end - end - end - - def test_list_messages - # Create test objects. - client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse.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_messages_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_list_messages_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_messages_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_messages({ 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_messages 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_messages ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.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_messages({ 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_messages(::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.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_messages_client_stub.call_count - end - end - end - - def test_query_data - # Create test objects. - client_result = ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - prompt = "hello world" - context = {} - generation_options = {} - - query_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::ServiceStub.stub :transcode_query_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, query_data_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.query_data({ parent: parent, prompt: prompt, context: context, generation_options: generation_options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.query_data parent: parent, prompt: prompt, context: context, generation_options: generation_options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.query_data ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new(parent: parent, prompt: prompt, context: context, generation_options: generation_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.query_data({ parent: parent, prompt: prompt, context: context, generation_options: generation_options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.query_data(::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new(parent: parent, prompt: prompt, context: context, generation_options: generation_options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, query_data_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::GeminiDataAnalytics::V1beta::DataChatService::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::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_test.rb deleted file mode 100644 index c505bbb7bff2..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/google/cloud/gemini_data_analytics/v1beta/data_chat_service_test.rb +++ /dev/null @@ -1,566 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/geminidataanalytics/v1beta/data_chat_service_pb" -require "google/cloud/gemini_data_analytics/v1beta/data_chat_service" - -class ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::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_chat - # Create GRPC objects. - grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::Message.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a server streaming method. - inline_context = {} - project = "hello world" - parent = "hello world" - messages = [{}] - - chat_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :chat, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::Context), request["inline_context"] - assert_equal :inline_context, request.context_provider - assert_equal "hello world", request["project"] - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, request["messages"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, chat_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.chat({ inline_context: inline_context, project: project, parent: parent, messages: messages }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.chat inline_context: inline_context, project: project, parent: parent, messages: messages do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.chat ::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new(inline_context: inline_context, project: project, parent: parent, messages: messages) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.chat({ inline_context: inline_context, project: project, parent: parent, messages: messages }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.chat(::Google::Cloud::GeminiDataAnalytics::V1beta::ChatRequest.new(inline_context: inline_context, project: project, parent: parent, messages: messages), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::Message, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, chat_client_stub.call_rpc_count - end - end - - def test_create_conversation - # Create GRPC objects. - grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.new - grpc_operation = GRPC::ActiveCall::Operation.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" - conversation_id = "hello world" - conversation = {} - request_id = "hello world" - - create_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_conversation, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["conversation_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation), request["conversation"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_conversation_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_conversation({ parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_conversation parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new(parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_conversation({ parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::CreateConversationRequest.new(parent: parent, conversation_id: conversation_id, conversation: conversation, request_id: request_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_conversation_client_stub.call_rpc_count - end - end - - def test_delete_conversation - # 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_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_conversation, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_conversation_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_conversation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_conversation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_conversation({ 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_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::DeleteConversationRequest.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_conversation_client_stub.call_rpc_count - end - end - - def test_get_conversation - # Create GRPC objects. - grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::Conversation.new - grpc_operation = GRPC::ActiveCall::Operation.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_conversation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_conversation, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_conversation_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_conversation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_conversation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_conversation ::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_conversation({ 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_conversation(::Google::Cloud::GeminiDataAnalytics::V1beta::GetConversationRequest.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_conversation_client_stub.call_rpc_count - end - end - - def test_list_conversations - # Create GRPC objects. - grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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_conversations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_conversations, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest, 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_conversations_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_conversations({ 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_conversations 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_conversations ::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.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_conversations({ 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_conversations(::Google::Cloud::GeminiDataAnalytics::V1beta::ListConversationsRequest.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_conversations_client_stub.call_rpc_count - end - end - - def test_list_messages - # Create GRPC objects. - grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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_messages_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_messages, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest, 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_messages_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_messages({ 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_messages 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_messages ::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.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_messages({ 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_messages(::Google::Cloud::GeminiDataAnalytics::V1beta::ListMessagesRequest.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_messages_client_stub.call_rpc_count - end - end - - def test_query_data - # Create GRPC objects. - grpc_response = ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataResponse.new - grpc_operation = GRPC::ActiveCall::Operation.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" - prompt = "hello world" - context = {} - generation_options = {} - - query_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :query_data, name - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["prompt"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataContext), request["context"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GeminiDataAnalytics::V1beta::GenerationOptions), request["generation_options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, query_data_client_stub do - # Create client - client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.query_data({ parent: parent, prompt: prompt, context: context, generation_options: generation_options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.query_data parent: parent, prompt: prompt, context: context, generation_options: generation_options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.query_data ::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new(parent: parent, prompt: prompt, context: context, generation_options: generation_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.query_data({ parent: parent, prompt: prompt, context: context, generation_options: generation_options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.query_data(::Google::Cloud::GeminiDataAnalytics::V1beta::QueryDataRequest.new(parent: parent, prompt: prompt, context: context, generation_options: generation_options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, query_data_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::GeminiDataAnalytics::V1beta::DataChatService::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::GeminiDataAnalytics::V1beta::DataChatService::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::GeminiDataAnalytics::V1beta::DataChatService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/helper.rb deleted file mode 100644 index 968201e8049d..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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/rg" - -require "grpc" - -require "ostruct"